[SCM] Samba Shared Repository - branch v3-3-test updated -
release-3-2-0pre2-4915-g5cd79db1
Jeff Layton
jlayton at samba.org
Fri Feb 6 13:15:59 GMT 2009
The branch, v3-3-test has been updated
via 5cd79db1326d70c592e86491d36567a2eb4e1717 (commit)
from e513360db3f2cc6ff1865ec08fc243dd6346e18e (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test
- Log -----------------------------------------------------------------
commit 5cd79db1326d70c592e86491d36567a2eb4e1717
Author: Shirish Pargaonkar <shirishpargaonkar at gmail.com>
Date: Fri Feb 6 08:15:35 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 9f4d1d3..df5be84 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;
@@ -1103,8 +1104,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;
@@ -1209,6 +1210,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();
@@ -1410,7 +1414,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:
@@ -1440,6 +1444,8 @@ mount_retry:
goto mount_exit;
}
+ if (nomtab)
+ goto mount_exit;
atexit(unlock_mtab);
rc = lock_mtab();
if (rc) {
--
Samba Shared Repository
More information about the samba-cvs
mailing list