git: b9752d5d1cea - main - linprocfs: Correct sysfs /proc/<pid>/mountinfo entry
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 10 Mar 2025 18:13:12 UTC
The branch main has been updated by glebius:
URL: https://cgit.FreeBSD.org/src/commit/?id=b9752d5d1cea30a39e89c83ea3aeb539581418cb
commit b9752d5d1cea30a39e89c83ea3aeb539581418cb
Author: Alex S <iwtcex@gmail.com>
AuthorDate: 2025-03-10 18:12:36 +0000
Commit: Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2025-03-10 18:12:36 +0000
linprocfs: Correct sysfs /proc/<pid>/mountinfo entry
Technically mount source could be an arbitrary string (since it's
effectively ignored), but it's common to repeat fs type there.
---
sys/compat/linprocfs/linprocfs.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c
index 587c7412d80a..cfb054235489 100644
--- a/sys/compat/linprocfs/linprocfs.c
+++ b/sys/compat/linprocfs/linprocfs.c
@@ -446,9 +446,6 @@ linprocfs_docpuinfo(PFS_FILL_ARGS)
}
#endif /* __i386__ || __amd64__ */
-static const char *path_slash_sys = "/sys";
-static const char *fstype_sysfs = "sysfs";
-
static int
_mtab_helper(const struct pfs_node *pn, const struct statfs *sp,
const char **mntfrom, const char **mntto, const char **fstype)
@@ -476,8 +473,7 @@ _mtab_helper(const struct pfs_node *pn, const struct statfs *sp,
}
if (strcmp(*fstype, "linsysfs") == 0) {
- *mntfrom = path_slash_sys;
- *fstype = fstype_sysfs;
+ *mntfrom = *fstype = "sysfs";
} else {
/* For Linux msdosfs is called vfat */
if (strcmp(*fstype, "msdosfs") == 0)