On Fri, Nov 06, 2009 at 03:46:20PM +0100, Karel Zak wrote: > On Fri, Nov 06, 2009 at 02:04:39PM +0000, Terry Burton wrote: > > 3. Leave mount broken and refuse a combination of -o ro and --bind > > arguments - "ERROR: Invalid argument for a --bind mount, -ro" > > the best solution seem to try to detect MS_BIND + MS_RDONLY and then > try to open() read-write any file in the target directory, and update > mtab according to the result from this test. And print any warning > if the target directory is still read-write. I forgot note that # mount --bind /foo /bar # mount -o remount,ro /bar works as expected (/foo is rw and /bar is ro). Karel -- Karel Zak <kzak@xxxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html