The branch, v3-2-test has been updated via 035fa67801d55f05afbac94592a7700764624ee4 (commit) from fe456e4bf8db272d1d6e99b4c1714894af17190b (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log ----------------------------------------------------------------- commit 035fa67801d55f05afbac94592a7700764624ee4 Author: Shirish Pargaonkar <shirishpargaon...@gmail.com> Date: Fri Feb 6 08:16:11 2009 -0500 mount.cifs: add fakemount (-f) and nomtab (-n) flags to mount.cifs ...so that these options work correctly when passed in by mount(8). ----------------------------------------------------------------------- Summary of changes: source/client/mount.cifs.c | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/source/client/mount.cifs.c b/source/client/mount.cifs.c index 79a84e6..021baf4 100644 --- a/source/client/mount.cifs.c +++ b/source/client/mount.cifs.c @@ -85,6 +85,7 @@ const char *thisprogram; int verboseflag = 0; +int fakemnt = 0; static int got_password = 0; static int got_user = 0; static int got_domain = 0; @@ -1099,8 +1100,8 @@ int main(int argc, char ** argv) mount_cifs_usage (); exit(EX_USAGE); case 'n': - ++nomtab; - break; + ++nomtab; + break; case 'b': #ifdef MS_BIND flags |= MS_BIND; @@ -1205,6 +1206,9 @@ int main(int argc, char ** argv) break; case 't': break; + case 'f': + ++fakemnt; + break; default: printf("unknown mount option %c\n",c); mount_cifs_usage(); @@ -1400,7 +1404,7 @@ mount_retry: } } - if (mount(dev_name, mountpoint, "cifs", flags, options)) { + if (!fakemnt && mount(dev_name, mountpoint, "cifs", flags, options)) { switch (errno) { case ECONNREFUSED: case EHOSTUNREACH: @@ -1430,6 +1434,8 @@ mount_retry: goto mount_exit; } + if (nomtab) + goto mount_exit; atexit(unlock_mtab); rc = lock_mtab(); if (rc) { -- Samba Shared Repository