[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] `mount --mount-commands` obsolete
From: |
Vadim Zeitlin |
Subject: |
Re: [lmi] `mount --mount-commands` obsolete |
Date: |
Wed, 2 Nov 2016 01:49:58 +0100 |
On Tue, 1 Nov 2016 20:57:01 +0000 Greg Chicares <address@hidden> wrote:
GC> I'm working on replacing 'echo -e' with 'printf' for portability, and
GC> I just came across this line:
GC> restore_opt_mount=`mount --mount-commands 2>/dev/null | grep '"/opt"'`
GC> which no longer does what it's supposed to do. Apparently, cygwin's
GC> 'mount' used to have a '--mount-commands' option, but no longer does:
Yes, it looks like it was renamed to --mount-entries in this commit
https://cygwin.com/git/gitweb.cgi?p=newlib-cygwin.git;a=commit;f=winsup/utils/mount.cc;h=56d81795705a67bef7e1e5fa934a2109e34b316f
back in 2008. Unfortunately, the commit message doesn't mention why the
change was done, but I guess the new name is simply more logical because
the output is indeed a set of entries, not commands. It's still a pity that
they couldn't keep the old option for compatibility, of course...
GC> Now why doesn't *nix mount(8) have an option like that?
Again, I can't be sure, but I think it's because any well-behaved Unix
system is supposed to have either/both /etc/mtab or/and /proc/mounts that
already contains this information, while things are not always that simple
under Cygwin.
Regards,
VZ