summaryrefslogtreecommitdiffstats
path: root/source/client
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-03-30 00:47:57 +0000
committerJeremy Allison <jra@samba.org>2005-03-30 00:47:57 +0000
commita0b75c42c6ba94a007b9056bea0c4bcdb181fb1a (patch)
treefff88e190cd2404324a0bae422d98f3f85354072 /source/client
parentd20aa2917b274276e0de05e95ec72fada3999890 (diff)
downloadsamba-a0b75c42c6ba94a007b9056bea0c4bcdb181fb1a.tar.gz
samba-a0b75c42c6ba94a007b9056bea0c4bcdb181fb1a.tar.xz
samba-a0b75c42c6ba94a007b9056bea0c4bcdb181fb1a.zip
r6120: Added "volume" command to smbclient that prints out the volume name and
serial number. Jeremy.
Diffstat (limited to 'source/client')
-rw-r--r--source/client/client.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/client/client.c b/source/client/client.c
index dbddf764158..d739f84b386 100644
--- a/source/client/client.c
+++ b/source/client/client.c
@@ -2236,6 +2236,25 @@ static int cmd_rename(void)
}
/****************************************************************************
+ Print the volume name.
+****************************************************************************/
+
+static int cmd_volume(void)
+{
+ fstring volname;
+ uint32 serial_num;
+ time_t create_date;
+
+ if (!cli_get_fs_volume_info(cli, volname, &serial_num, &create_date)) {
+ d_printf("Errr %s getting volume info\n",cli_errstr(cli));
+ return 1;
+ }
+
+ d_printf("Volume: |%s| serial number 0x%x\n", volname, (unsigned int)serial_num);
+ return 0;
+}
+
+/****************************************************************************
Hard link files using the NT call.
****************************************************************************/
@@ -2748,6 +2767,7 @@ static struct
{"tar",cmd_tar,"tar <c|x>[IXFqbgNan] current directory to/from <file name>",{COMPL_NONE,COMPL_NONE}},
{"tarmode",cmd_tarmode,"<full|inc|reset|noreset> tar's behaviour towards archive bits",{COMPL_NONE,COMPL_NONE}},
{"translate",cmd_translate,"toggle text translation for printing",{COMPL_NONE,COMPL_NONE}},
+ {"volume",cmd_volume,"print the volume name",{COMPL_NONE,COMPL_NONE}},
{"vuid",cmd_vuid,"change current vuid",{COMPL_NONE,COMPL_NONE}},
{"logon",cmd_logon,"establish new logon",{COMPL_NONE,COMPL_NONE}},
{"listconnect",cmd_list_connect,"list open connections",{COMPL_NONE,COMPL_NONE}},