Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug/Request: _umountable should not depend on /etc/mtab



Am Fr., 16. Okt. 2020 um 15:35 Uhr schrieb Daniel Shahaf
<d.s@xxxxxxxxxxxxxxxxxx>:
>
> 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




Messages sorted by: Reverse Date, Date, Thread, Author