My brain hurts. (Messing with mount.)
Rob Landley
rob at landley.net
Tue Mar 7 15:36:44 UTC 2006
On Tuesday 07 March 2006 3:16 am, Bernhard Fischer wrote:
> On Mon, Mar 06, 2006 at 02:55:37PM -0500, Rob Landley wrote:
> >On Monday 06 March 2006 3:31 am, Denis Vlasenko wrote:
> >> > "mount -o remount,rw" does require at least one argument.
> >>
> >> Makes sense too. More to it, passing _two_ arguments would be rather
> >> confusing.
> >
> >But you can. Probably doesn't do what you expect... :)
>
> Didn't look, just curious if the various -onoac,noacl,xyz_xattr,...
> are supported?
Anything we don't recognize gets passed on to the kernel.
The way the mount syscall works is you feed it your two arguments (source and
directory), plus a bitfield full of flags (from sys/mounts.h) to tell the VFS
what to do, and a filesystem options string containing comma-separated
fields.
To clarify, the bitfield is for the Linux Virtual FileSystem. It's stuff that
applies to all filesystems (like "read only" or remount) or else doesn't
involve any specific filesystem (like bind). The options string is
per-filesystem options, the generic parts of the kernel have no idea what it
means, it just passes that on verbatim to the ext2 driver or whatever.
The way the mount command works blurs the two together. It recognizes
specific options from the options string (like "noatime") that are actually
VFS options rather than filesystem options, splices them out, and sets the
appropriate flag for the VFS. Anything that isn't recognized is assumed to
be a filesystem option.
Rob
--
Never bet against the cheap plastic solution.
More information about the busybox
mailing list