1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
From 9d5573fbbd157d77b93869511a83bff1d79edc32 Mon Sep 17 00:00:00 2001
From: Andrey Kiryanov <kiryanov_ak@pnpi.nrcki.ru>
Date: Wed, 24 Sep 2025 16:37:46 +0300
Subject: [PATCH] Fix fscanf return value comparison
---
src/wn/arc-job-cgroup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/wn/arc-job-cgroup.c b/src/wn/arc-job-cgroup.c
index a08841d55..398fe325e 100644
--- a/src/wn/arc-job-cgroup.c
+++ b/src/wn/arc-job-cgroup.c
@@ -44,7 +44,7 @@ int get_cgroup_mount_root(const char *req_controller, char *cgroup_root_ptr) {
int found = 0;
// The skipped first field here is fs_spec.
while (!found && fscanf(proc_mount_fd, "%*s %" STR(FILENAME_MAX) "s %" STR(FS_BUFSIZE) "s %" STR(FS_BUFSIZE) "s %d %d\n",
- fs_mount, fs_type, fs_mntopts, &fs_freq, &fs_passno) == 6 ) {
+ fs_mount, fs_type, fs_mntopts, &fs_freq, &fs_passno) == 5 ) {
if (strcmp(fs_type, "cgroup")) continue;
// split mount options to find the requested controller
mntopt = strtok_r(fs_mntopts, ",", &mntopt_pos);
--
2.51.0
|