zsh-users
 help / color / mirror / code / Atom feed
* Bug/Request: _umountable should not depend on /etc/mtab
@ 2020-10-16 10:14 Norbert Lange
  2020-10-16 13:35 ` Daniel Shahaf
  0 siblings, 1 reply; 5+ messages in thread
From: Norbert Lange @ 2020-10-16 10:14 UTC (permalink / raw)
  To: zsh-users

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug/Request: _umountable should not depend on /etc/mtab
  2020-10-16 10:14 Bug/Request: _umountable should not depend on /etc/mtab Norbert Lange
@ 2020-10-16 13:35 ` Daniel Shahaf
  2020-10-16 14:11   ` Norbert Lange
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Shahaf @ 2020-10-16 13:35 UTC (permalink / raw)
  To: Norbert Lange, zsh-users

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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug/Request: _umountable should not depend on /etc/mtab
  2020-10-16 13:35 ` Daniel Shahaf
@ 2020-10-16 14:11   ` Norbert Lange
  2020-10-16 14:33     ` Daniel Shahaf
  0 siblings, 1 reply; 5+ messages in thread
From: Norbert Lange @ 2020-10-16 14:11 UTC (permalink / raw)
  To: Daniel Shahaf; +Cc: zsh-users

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug/Request: _umountable should not depend on /etc/mtab
  2020-10-16 14:11   ` Norbert Lange
@ 2020-10-16 14:33     ` Daniel Shahaf
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Shahaf @ 2020-10-16 14:33 UTC (permalink / raw)
  To: Norbert Lange; +Cc: zsh-users

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?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Bug/Request: _umountable should not depend on /etc/mtab
@ 2020-10-02  9:29 Norbert Lange
  0 siblings, 0 replies; 5+ messages in thread
From: Norbert Lange @ 2020-10-02  9:29 UTC (permalink / raw)
  To: zsh-users

[-- 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 --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-10-16 14:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-16 10:14 Bug/Request: _umountable should not depend on /etc/mtab Norbert Lange
2020-10-16 13:35 ` Daniel Shahaf
2020-10-16 14:11   ` Norbert Lange
2020-10-16 14:33     ` Daniel Shahaf
  -- strict thread matches above, loose matches on Subject: below --
2020-10-02  9:29 Norbert Lange

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).