[SCM] Samba Shared Repository - branch master updated -
release-4-0-0alpha6-1125-gd7ca499
Michael Adam
obnox at samba.org
Tue Feb 24 16:03:10 GMT 2009
The branch, master has been updated
via d7ca4997017e86b6f23ced64f1f1672bfb15716b (commit)
via 6e16c5eed59bb3539af365d30e9ec35012b8c8ac (commit)
from 89c682c4185acbf5de16cb4132e33ea825527f41 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit d7ca4997017e86b6f23ced64f1f1672bfb15716b
Author: Michael Adam <obnox at samba.org>
Date: Tue Feb 24 16:58:33 2009 +0100
s3:mount.cifs: make "mount.cifs -V" print the version, not usage.
Also make "mount.cifs -h" not exit with error exit code but with return code 0.
Michael
commit 6e16c5eed59bb3539af365d30e9ec35012b8c8ac
Author: Michael Adam <obnox at samba.org>
Date: Tue Feb 24 16:57:30 2009 +0100
s3:mount.cifs: don't error exit on explicitly requested help...
Michael
-----------------------------------------------------------------------
Summary of changes:
source3/client/mount.cifs.c | 36 +++++++++++++++++++++++++++++-------
1 files changed, 29 insertions(+), 7 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/client/mount.cifs.c b/source3/client/mount.cifs.c
index a736609..ae8a7fd 100644
--- a/source3/client/mount.cifs.c
+++ b/source3/client/mount.cifs.c
@@ -179,7 +179,6 @@ static void mount_cifs_usage(void)
printf("\n\t%s -V\n",thisprogram);
SAFE_FREE(mountpassword);
- exit(EX_USAGE);
}
/* caller frees username if necessary */
@@ -1017,6 +1016,14 @@ uppercase_string(char *string)
return 1;
}
+static void print_cifs_mount_version(void)
+{
+ printf("mount.cifs version: %s.%s%s\n",
+ MOUNT_CIFS_VERSION_MAJOR,
+ MOUNT_CIFS_VERSION_MINOR,
+ MOUNT_CIFS_VENDOR_SUFFIX);
+}
+
int main(int argc, char ** argv)
{
int c;
@@ -1078,6 +1085,24 @@ int main(int argc, char ** argv)
exit(EX_SYSERR);
}
mountpoint = argv[2];
+ } else if (argc == 2) {
+ if ((strcmp(argv[1], "-V") == 0) ||
+ (strcmp(argv[1], "--version") == 0))
+ {
+ print_cifs_mount_version();
+ exit(0);
+ }
+
+ if ((strcmp(argv[1], "-h") == 0) ||
+ (strcmp(argv[1], "-?") == 0) ||
+ (strcmp(argv[1], "--help") == 0))
+ {
+ mount_cifs_usage();
+ exit(0);
+ }
+
+ mount_cifs_usage();
+ exit(EX_USAGE);
} else {
mount_cifs_usage();
exit(EX_USAGE);
@@ -1102,7 +1127,7 @@ int main(int argc, char ** argv)
case '?':
case 'h': /* help */
mount_cifs_usage ();
- exit(EX_USAGE);
+ exit(0);
case 'n':
++nomtab;
break;
@@ -1134,11 +1159,8 @@ int main(int argc, char ** argv)
case 'v':
++verboseflag;
break;
- case 'V':
- printf ("mount.cifs version: %s.%s%s\n",
- MOUNT_CIFS_VERSION_MAJOR,
- MOUNT_CIFS_VERSION_MINOR,
- MOUNT_CIFS_VENDOR_SUFFIX);
+ case 'V':
+ print_cifs_mount_version();
exit (0);
case 'w':
flags &= ~MS_RDONLY;
--
Samba Shared Repository
More information about the samba-cvs
mailing list