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.

(cherry picked from commit b9752d5d1cea30a39e89c83ea3aeb539581418cb)
This commit is contained in:
Alex S 2025-03-10 11:12:36 -07:00 committed by Gleb Smirnoff
parent 96e6fc517f
commit eca3c0515b

View file

@ -448,9 +448,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)
@ -478,8 +475,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)