[-- Attachment #1: Type: text/plain, Size: 211 bytes --] Hello, On Linux, /etc/mtab is ancient history, please use /proc/self/mounts. Atleast the _unmountable function is affected. (its easy to add an compatibility symlink, but this should not be necessary) Norbert [-- Attachment #2: Type: text/html, Size: 303 bytes --]
Hello, On Linux, /etc/mtab is ancient history, please use /proc/self/mounts. Atleast the _unmountable function is affected. (its easy to add an compatibility symlink, but this should not be necessary) Norbert
Norbert Lange wrote on Fri, 16 Oct 2020 10:14 +00:00:
> Hello,
>
> On Linux, /etc/mtab is ancient history, please use /proc/self/mounts.
> Atleast the _unmountable function is affected.
> (its easy to add an compatibility symlink, but this should not be necessary)
Can we just s#/etc/mtab#/proc/self/mounts#g? I.e., what Linux systems
_don't_ have /proc/self/mounts? (New systems with custom kernel
configs? Old systems? _How_ old?)
Failing that, the code will have to use /proc/self/mounts if it exists
and /etc/mtab otherwise.
Am Fr., 16. Okt. 2020 um 15:35 Uhr schrieb Daniel Shahaf <d.s@daniel.shahaf.name>: > > Norbert Lange wrote on Fri, 16 Oct 2020 10:14 +00:00: > > Hello, > > > > On Linux, /etc/mtab is ancient history, please use /proc/self/mounts. > > Atleast the _unmountable function is affected. > > (its easy to add an compatibility symlink, but this should not be necessary) > > Can we just s#/etc/mtab#/proc/self/mounts#g? I.e., what Linux systems > _don't_ have /proc/self/mounts? (New systems with custom kernel > configs? Old systems? _How_ old?) > > Failing that, the code will have to use /proc/self/mounts if it exists > and /etc/mtab otherwise. Hi, /proc/self/mounts has been available since Linux 2.4.19, released in 2002. Given how likely that is to run on current hardware I'd say, just sed away. /proc/self/mounts is itself superseded by /proc/self/mountinfo, which contains more info but has a different format. https://man7.org/linux/man-pages/man5/proc.5.html Norbert
Norbert Lange wrote on Fri, 16 Oct 2020 16:11 +0200: > /proc/self/mounts has been available since Linux 2.4.19, released in 2002. > Given how likely that is to run on current hardware I'd say, just sed away. +1 Anyone wants to do the honours? > /proc/self/mounts is itself superseded by /proc/self/mountinfo, > which contains more info but has a different format. > > https://man7.org/linux/man-pages/man5/proc.5.html Good point. However, is any of the additional info important enough to be printed by default (as a completion or as a description)? Or at least, important enough to be parsed by compsys and made available to completion functions via some API?