On Tue, 24 May 2011 18:26:43 -0600, Theo de Raadt wrote:
$ grep sd0k /etc/fstab
/dev/sd0k /home/luca/ext2fs ext2fs rdonly,nodev,nosuid 0 0

                                     ^^^^^^
There is no such keyword in a fstab file.

Obvious PEBKAC here, blindly putting mount(1) options into fstab(5).

The error message from mount is tricky though, getfsspec(3) which is used by mount just silently ignores the line.

All entries in the file with a type field equivalent to FSTAB_XX are ignored. Lines which are formatted incorrectly are silently ignored.

So "formatted incorrectly" includes invalid options.

Could this be improved somehow by changing getfsspec() behaviour to report the issue to the caller? Or by expanding the manpage a bit?

I guess making mount/fstab more consistent by using the same name for rdonly/ro is a compatibility can of worms.

thanks

Luca

Reply via email to