[SCM] Samba Shared Repository - branch v3-3-test updated
Karolin Seeger
kseeger at samba.org
Fri Oct 9 00:27:49 MDT 2009
The branch, v3-3-test has been updated
via d411319... s3:mount.cifs: make "mount.cifs -V" print the version, not usage.
via 2cda51b... Revert "cifs mount did not properly display version string when no other parameters passed in."
from 6c4fe10... WHATSNEW: Add more coherent explanation for bug #6680.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test
- Log -----------------------------------------------------------------
commit d41131948346619be98514331d7059d9bffecac5
Author: Michael Adam <obnox at samba.org>
Date: Thu Oct 8 10:44:48 2009 -0400
s3:mount.cifs: make "mount.cifs -V" print the version, not usage.
(cherry-picked from d7ca4997017e86b6f23ced64f1f1672bfb15716b)
Also make "mount.cifs -h" not exit with error exit code but with return code 0.
Michael
Part 2/2 of a fix for bug #6692 (mount.cifs segfault).
commit 2cda51b4e6fba53c04f87e4c2dd99a952a63d812
Author: Jeff Layton <jlayton at redhat.com>
Date: Thu Oct 8 10:42:37 2009 -0400
Revert "cifs mount did not properly display version string when no other parameters passed in."
This reverts commit c7bf0f4c222ae46be2a751997e03197832b494cd.
Part 1/2 of a fix for bug #6692.
-----------------------------------------------------------------------
Summary of changes:
source/client/mount.cifs.c | 41 ++++++++++++++++++++++++++++-------------
1 files changed, 28 insertions(+), 13 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/client/mount.cifs.c b/source/client/mount.cifs.c
index c78aee0..0add7a8 100644
--- a/source/client/mount.cifs.c
+++ b/source/client/mount.cifs.c
@@ -1036,6 +1036,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;
@@ -1097,15 +1105,25 @@ int main(int argc, char ** argv)
exit(EX_SYSERR);
}
mountpoint = argv[2];
- } else {
- if ((strcmp (argv[1], "--version") == 0) ||
- ((strcmp (argv[1], "-V") == 0))) {
- printf ("mount.cifs version: %s.%s%s\n",
- MOUNT_CIFS_VERSION_MAJOR,
- MOUNT_CIFS_VERSION_MINOR,
- MOUNT_CIFS_VENDOR_SUFFIX);
- exit (0);
+ } 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);
}
@@ -1161,11 +1179,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