-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sat, 24 Mar 2012 08:26:59 -0400 Jeff Layton <jlayton@xxxxxxxxx> wrote: > autofs generally calls mount helpers with '-s'. Handle that the same > way we do for NFS -- append ",sloppy" option to the mount options. > > The kernel can look for that option to decide whether to ignore > unknown mount options, warn, or error out. > > Signed-off-by: Jeff Layton <jlayton@xxxxxxxxx> > --- > mount.cifs.c | 10 +++++++++- > 1 files changed, 9 insertions(+), 1 deletions(-) > > diff --git a/mount.cifs.c b/mount.cifs.c > index 824cd3a..c0aea35 100644 > --- a/mount.cifs.c > +++ b/mount.cifs.c > @@ -1438,6 +1438,7 @@ static struct option longopts[] = { > {"pass", 1, NULL, 'p'}, > {"credentials", 1, NULL, 'c'}, > {"port", 1, NULL, 'P'}, > + {"sloppy", 0, NULL, 's'}, > {NULL, 0, NULL, 0} > }; > > @@ -1863,6 +1864,7 @@ int main(int argc, char **argv) > char *currentaddress, *nextaddress; > int rc = 0; > int already_uppercased = 0; > + int sloppy = 0; > size_t options_size = MAX_OPTIONS_LEN; > struct parsed_mount_info *parsed_info = NULL; > pid_t pid; > @@ -1900,7 +1902,7 @@ int main(int argc, char **argv) > } > > /* add sharename in opts string as unc= parm */ > - while ((c = getopt_long(argc, argv, "?fhno:rvVw", > + while ((c = getopt_long(argc, argv, "?fhno:rsvVw", > longopts, NULL)) != -1) { > switch (c) { > case '?': > @@ -1932,6 +1934,9 @@ int main(int argc, char **argv) > case 'f': > ++parsed_info->fakemnt; > break; > + case 's': > + ++sloppy; > + break; > default: > fprintf(stderr, "unknown command-line option: %c\n", c); > rc = mount_usage(stderr); > @@ -2037,6 +2042,9 @@ mount_retry: > strlcat(options, parsed_info->prefix, options_size); > } > > + if (sloppy) > + strlcat(options, ",sloppy", options_size); > + > if (parsed_info->verboseflag) > fprintf(stderr, "%s kernel mount options: %s", > thisprogram, options); Merged... - -- Jeff Layton <jlayton@xxxxxxxxx> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iQIcBAEBAgAGBQJPcvneAAoJEAAOaEEZVoIVTmYQAKJOQeWa6eP8bcLhlAdF7FGx zPPI/u9aYn+XjrS/cnQK6zCQBXf2WyemUCaKWM8oqz7M+PJiICYQVtbkVBsKz0VW XlpruyU+3hogLXMEC9pLROIjcNAnML7MFi/amPV7vrPt7U3zfhO/6sOMwzSA+3Ik CAhtkCSWlSysfIyu92MgSjeAS25eTjqumWPfTdVE9L0xoBCoZfDzmDFMbkdsvlmg bRXHc+mJ9d65RdvGIOYZYOdLr+CdGB4J2WHoAehuC8HWua8TO9+Xxj2ARIPWxJ/c ADEE9EwEtTgE2nPA0WUySVP9RxkvarYAPJiAZy8gOPlQ/QDI1Gh4PEEf1GS1CtiR 9OQ5515L53BQrZlFbxqpwsmJz+IrUkKnAd1SJCMk3Quxx3TI5siK+6CYfaac1VAt OX5kRsvhjLgyh0vxDWJlGF37LdBqJeeBN90NzYp7jnTWHaTSk2YVXwzmeTgR4PqQ PYyDwSHwx+6Fr2SviO/w+LYObfxJ5ZdJ8LiWQSnFrgFABBSI2LFYyogVLzyayKpM J125DkY6uX/mZVWula4n9jBgt1+9JUn7glul/PGAnn58c8mEThdWizfjVdIIdX/k hUAffmwb4lbC0S7PDjk5od4g+rg8tZZ9eQMzw8hYVhHsFwLgPgp2c7JTxpO9dw9C lY3W6rZAOapYXB6rFXlF =kehk -----END PGP SIGNATURE----- ÿôèº{.nÇ+?·?®??+%?Ëÿ±éݶ¥?wÿº{.nÇ+?·¥?{±ýÈ?³ø§¶?¡Ü¨}©?²Æ zÚ&j:+v?¨þø¯ù®w¥þ?à2?Þ?¨èÚ&¢)ß¡«a¶Úÿÿûàz¿äz¹Þ?ú+?ù???Ý¢jÿ?wèþf