summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/client/mount.cifs.c33
1 files changed, 28 insertions, 5 deletions
diff --git a/source3/client/mount.cifs.c b/source3/client/mount.cifs.c
index 641584947f..ae8a7fd186 100644
--- a/source3/client/mount.cifs.c
+++ b/source3/client/mount.cifs.c
@@ -1016,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;
@@ -1077,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);
@@ -1133,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;