[Toybox] Small issue with mount option syntax: "mount -a -t noblah, blah"

Rob Landley rob at landley.net
Fri Dec 18 04:48:11 PST 2020


On 12/15/20 2:24 PM, Andy Hu via Toybox wrote:
> # toybox mount -a -t nomsdos,smbfs 
> returns error "bad typelist". Toybox seems to expect 
> # toybox mount -a -t nomsdos,nosmbfs
> as commented in lib/portability.c:134
> // If one -t starts with "no", the rest must too 
Hmmm, it seemed like mixing no and not-no was ambiguous, but I guess if the
first entry has no the entire list is inverted and there's nothing else it
_could_ mean? (And if the first one doesn't have no but a later one does, it's
an unrecognized type.)

> Most manuals and implementations of mount have, quote:
>               More than one type may be specified in a comma-separated list,
>               for the -t option as well as in an /etc/fstab entry.  The list
>               of filesystem types for the -t option can be prefixed with no
>               to specify the filesystem types on which no action should be

Yup, it's the _list_ that's prefixed. Everything-but logic. Ok...

>               taken.  The prefix no has no effect when specified in an
>               /etc/fstab entry.
>               The prefix no can be meaningful with the -a option.  For
>               example, the command
> 
>                      mount -a -t nomsdos,smbfs
> 
>               mounts all filesystems except those of type msdos and smbfs.
> ------ end quote ------
> I couldn't find specifications on how prefixing no with each type, or some types
> should be handled. Suggest making a patch for the time being:
> 1. leading "no" in whole string negates all types

Try now?

Rob



More information about the Toybox mailing list