代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/lxcfs 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
diff --git a/src/proc_fuse.c b/src/proc_fuse.c
index b4f4129..6b503d6 100644
--- a/src/proc_fuse.c
+++ b/src/proc_fuse.c
@@ -224,6 +224,8 @@ static uint64_t get_min_memlimit(const char *cgroup, bool swap)
return log_error_errno(0, ENOMEM, "Failed to allocate memory");
retlimit = get_memlimit(copy, swap);
+ if (retlimit == 0)
+ return retlimit;
while (strcmp(copy, "/") != 0) {
char *it = copy;
@@ -283,6 +285,8 @@ static int proc_swaps_read(char *buf, size_t size, off_t offset,
prune_init_slice(cgroup);
memlimit = get_min_memlimit(cgroup, false);
+ if (memlimit == 0)
+ return 0;
ret = cgroup_ops->get_memory_current(cgroup_ops, cgroup, &memusage_str);
if (ret < 0)
@@ -1209,6 +1213,8 @@ static int proc_meminfo_read(char *buf, size_t size, off_t offset,
return read_file_fuse("/proc/meminfo", buf, size, d);
memlimit = get_min_memlimit(cgroup, false);
+ if (memlimit == 0)
+ return 0;
/*
* Following values are allowed to fail, because swapaccount might be
@@ -1237,9 +1243,9 @@ static int proc_meminfo_read(char *buf, size_t size, off_t offset,
memusage /= 1024;
memlimit /= 1024;
+ char *printme, lbuf[100];
while (getline(&line, &linelen, f) != -1) {
ssize_t l;
- char *printme, lbuf[100];
memset(lbuf, 0, 100);
if (startswith(line, "MemTotal:")) {
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。