oomd: switch system context parsing to use /proc/meminfo

Makes it easier in the next commits to unify on one way to read swap and
memory info.
This commit is contained in:
Anita Zhang
2021-06-30 03:47:26 -07:00
parent 4dbad977ff
commit 47136b9d9a
6 changed files with 106 additions and 70 deletions
+2 -2
View File
@@ -35,8 +35,8 @@ int read_resource_pressure(const char *path, PressureType type, ResourcePressure
return -EINVAL;
r = fopen_unlocked(path, "re", &f);
if (r < 0)
return r;
if (r < 0)
return r;
for (;;) {
_cleanup_free_ char *l = NULL;