]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsfd: (refactor) rename add_nodevs to read_mountinfo
authorMasatake YAMATO <yamato@redhat.com>
Wed, 3 Jan 2024 06:54:03 +0000 (15:54 +0900)
committerKarel Zak <kzak@redhat.com>
Thu, 29 Feb 2024 18:52:10 +0000 (19:52 +0100)
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
(cherry picked from commit 18a1403401112665f5015770c99f96ced5c6e38e)

misc-utils/lsfd.c

index cdbc48476ebedb54aec82db100dea083206eeebb..ac7b37843f7f949ac3139054cd5a1032b4dad814 100644 (file)
@@ -1093,7 +1093,7 @@ const char *get_nodev_filesystem(unsigned long minor)
        return NULL;
 }
 
-static void add_nodevs(FILE *mnt)
+static void read_mountinfo(FILE *mnt)
 {
        /* This can be very long. A line in mountinfo can have more than 3
         * paths. */
@@ -1701,7 +1701,7 @@ static void read_process(struct lsfd_control *ctl, struct path_cxt *pc,
        if (proc->ns_mnt == 0 || !has_mnt_ns(proc->ns_mnt)) {
                FILE *mnt = ul_path_fopen(pc, "r", "mountinfo");
                if (mnt) {
-                       add_nodevs(mnt);
+                       read_mountinfo(mnt);
                        if (proc->ns_mnt)
                                add_mnt_ns(proc->ns_mnt);
                        fclose(mnt);