In order to extract information about block devices, ghw parses /etc/mtab. This is pretty much the only reason why ghw needs to access the /etc subtree. But /etc/mtab itself is more and more legacy. On fedora 34, is a symlink to /proc/self/mounts:
$ ls -lh /etc/mtab
lrwxrwxrwx. 1 root root 19 Jun 1 2018 /etc/mtab -> ../proc/self/mounts
In order to be more containerization-friendly, but also to be more future-proof, we should read the same information from procfs.
In order to extract information about block devices, ghw parses
/etc/mtab
. This is pretty much the only reason why ghw needs to access the /etc subtree. But/etc/mtab
itself is more and more legacy. On fedora 34, is a symlink to/proc/self/mounts
:In order to be more containerization-friendly, but also to be more future-proof, we should read the same information from procfs.