Date: Tue, 2 Jul 2013 01:11:52 +0200 From: Robert Millan <rmh@freebsd.org> To: freebsd-fs@freebsd.org Subject: Compatibility options for mount(8) Message-ID: <CAOfDtXM_KJeLLUcsFA0EZOC8ZgSjKiLKuGeeNPQKCcZwcaJbCQ@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
--047d7b2e52909ae8eb04e07b5aa9 Content-Type: text/plain; charset=UTF-8 Hi, On Debian GNU/kFreeBSD, we've been using these bits of glue to make FreeBSD mount a bit more compatible with the Linux version of mount. We found that this occasionally helps when porting software that needs to use those features and relies on Linux semantics: - Ignore "-n" flag, since it requests not to update /etc/mtab, which we never do anyway. - Map "-o remount" to its FreeBSD equivalent, "-o update". I'd like to check in the attached patch. Please have a look! Thanks -- Robert Millan --047d7b2e52909ae8eb04e07b5aa9 Content-Type: application/octet-stream; name="mount_cli_compat.diff" Content-Disposition: attachment; filename="mount_cli_compat.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hima6x510 SW5kZXg6IHNiaW4vbW91bnQvbW91bnQuYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBzYmluL21vdW50L21vdW50 LmMJKHJldmlzaW9uIDI1MjQ5MCkKKysrIHNiaW4vbW91bnQvbW91bnQuYwkod29ya2luZyBjb3B5 KQpAQCAtMjUzLDcgKzI1Myw3IEBACiAJb3B0aW9ucyA9IE5VTEw7CiAJdmZzbGlzdCA9IE5VTEw7 CiAJdmZzdHlwZSA9ICJ1ZnMiOwotCXdoaWxlICgoY2ggPSBnZXRvcHQoYXJnYywgYXJndiwgImFk RjpmTGxvOnBydDp1dnciKSkgIT0gLTEpCisJd2hpbGUgKChjaCA9IGdldG9wdChhcmdjLCBhcmd2 LCAiYWRGOmZMbG86cHJ0OnV2d24iKSkgIT0gLTEpCiAJCXN3aXRjaCAoY2gpIHsKIAkJY2FzZSAn YSc6CiAJCQlhbGwgPSAxOwpAQCAtMjc0LDYgKzI3NCw5IEBACiAJCWNhc2UgJ2wnOgogCQkJbGF0 ZSA9IDE7CiAJCQlicmVhazsKKwkJY2FzZSAnbic6CisJCQkvKiBGb3IgY29tcGF0aWJpbGl0eSB3 aXRoIHRoZSBMaW51eCB2ZXJzaW9uIG9mIG1vdW50LiAqLworCQkJYnJlYWs7CiAJCWNhc2UgJ28n OgogCQkJaWYgKCpvcHRhcmcpIHsKIAkJCQlvcHRpb25zID0gY2F0b3B0KG9wdGlvbnMsIG9wdGFy Zyk7CkBAIC03NzEsNiArNzc0LDExIEBACiAJCQl9IGVsc2UgaWYgKHN0cm5jbXAocCwgZ3JvdXBx dW90YWVxLAogCQkJICAgIHNpemVvZihncm91cHF1b3RhZXEpIC0gMSkgPT0gMCkgewogCQkJCWNv bnRpbnVlOworCQkJfSBlbHNlIGlmIChzdHJjbXAocCwgInJlbW91bnQiKSA9PSAwKSB7CisJCQkJ LyogRm9yIGNvbXBhdGliaWxpdHkgd2l0aCB0aGUgTGludXggdmVyc2lvbiBvZiBtb3VudC4gKi8K KwkJCQlhcHBlbmRfYXJnKGEsIHN0cmR1cCgiLW8iKSk7CisJCQkJYXBwZW5kX2FyZyhhLCBzdHJk dXAoInVwZGF0ZSIpKTsKKwkJCQljb250aW51ZTsKIAkJCX0gZWxzZSBpZiAoKnAgPT0gJy0nKSB7 CiAJCQkJYXBwZW5kX2FyZyhhLCBwKTsKIAkJCQlwID0gc3RyY2hyKHAsICc9Jyk7Cg== --047d7b2e52909ae8eb04e07b5aa9--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOfDtXM_KJeLLUcsFA0EZOC8ZgSjKiLKuGeeNPQKCcZwcaJbCQ>