ibm-s390-linux / s390-tools

Tools for use with the s390 Linux kernel and device drivers
MIT License
63 stars 59 forks source link

fdasd fails if sysfs is mounted with "mount -t sysfs none /sys" #91

Closed markkp closed 3 years ago

markkp commented 3 years ago

util_proc_mnt_get_entry in /libutil/util_proc.c will only succeed if sysfs is mounted via a command like this: mount -t sysfs sysfs /sys

If a script mounts it with: mount -t sysfs none /sys

Then util_proc_mnt_get_entry only checks to see if entry->spec is equal to "sysfs", so it fails.

The code should be broadened a bit to check entry->vfstype as well as entry->spec.

markkp commented 3 years ago

fix.check.for.sysfs.mount.patch.txt

This one-line change may or may not be the appropriate fix, but it does seem to work, and still fails when /sys is not mounted.