]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsfd: (refactor) rename a member of struct proc
authorMasatake YAMATO <yamato@redhat.com>
Fri, 5 Jan 2024 01:27:42 +0000 (10:27 +0900)
committerMasatake YAMATO <yamato@redhat.com>
Sat, 24 Feb 2024 17:12:45 +0000 (02:12 +0900)
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
misc-utils/lsfd.c
misc-utils/lsfd.h

index 1fbc028e41b9e5cb69a18bde33d91830c868c403..503f24158d335d5420d8580b5740f26d6b9c97e0 100644 (file)
@@ -851,9 +851,9 @@ static struct file *collect_file_symlink(struct path_cxt *pc,
                return f;
 
        if (is_association(f, NS_MNT)) {
-               proc->ns_mnt = find_mnt_ns(f->stat.st_ino);
-               if (proc->ns_mnt == NULL)
-                       proc->ns_mnt = add_mnt_ns(f->stat.st_ino);
+               proc->mnt_ns = find_mnt_ns(f->stat.st_ino);
+               if (proc->mnt_ns == NULL)
+                       proc->mnt_ns = add_mnt_ns(f->stat.st_ino);
        } else if (is_association(f, NS_NET))
                load_sock_xinfo(pc, name, f->stat.st_ino);
 
@@ -1801,18 +1801,18 @@ static void read_process(struct lsfd_control *ctl, struct path_cxt *pc,
         */
 
        /* 1/3. Read /proc/$pid/ns/mnt */
-       if (proc->ns_mnt == NULL)
+       if (proc->mnt_ns == NULL)
                collect_namespace_files_tophalf(pc, proc);
 
        /* 2/3. read /proc/$pid/mountinfo unless we have read it already.
         * The backing device for "nsfs" is solved here.
         */
-       if (proc->ns_mnt == NULL || !proc->ns_mnt->read_mountinfo) {
+       if (proc->mnt_ns == NULL || !proc->mnt_ns->read_mountinfo) {
                FILE *mountinfo = ul_path_fopen(pc, "r", "mountinfo");
                if (mountinfo) {
                        read_mountinfo(mountinfo);
-                       if (proc->ns_mnt)
-                               proc->ns_mnt->read_mountinfo = true;
+                       if (proc->mnt_ns)
+                               proc->mnt_ns->read_mountinfo = true;
                        fclose(mountinfo);
                }
        }
index 1a180fe05e577178736f78c8db1160c08cb6b2ae..b9a402ad20d628e732a61dad896d034a1f5b4039 100644 (file)
@@ -157,7 +157,7 @@ struct proc {
        struct proc * leader;
        char *command;
        uid_t uid;
-       struct mnt_namespace *ns_mnt;
+       struct mnt_namespace *mnt_ns;
        struct list_head procs;
        struct list_head files;
        unsigned int kthread: 1;