Commit a536004f authored by Frédéric Delanoy's avatar Frédéric Delanoy Committed by Alexandre Julliard

cmd: Improve WCMD_volume documentation.

parent e9a8b751
......@@ -2644,11 +2644,13 @@ void WCMD_version (void) {
/****************************************************************************
* WCMD_volume
*
* Display volume info and/or set volume label. Returns 0 if error.
* Display volume information (set_label = FALSE)
* Additionally set volume label (set_label = TRUE)
* Returns 1 on success, 0 otherwise
*/
int WCMD_volume (int mode, const WCHAR *path) {
int WCMD_volume(BOOL set_label, const WCHAR *path)
{
DWORD count, serial;
WCHAR string[MAX_PATH], label[MAX_PATH], curdir[MAX_PATH];
BOOL status;
......@@ -2679,7 +2681,7 @@ int WCMD_volume (int mode, const WCHAR *path) {
}
WCMD_output (WCMD_LoadMessage(WCMD_VOLUMEDETAIL),
curdir[0], label, HIWORD(serial), LOWORD(serial));
if (mode) {
if (set_label) {
WCMD_output (WCMD_LoadMessage(WCMD_VOLUMEPROMPT));
WCMD_ReadFile (GetStdHandle(STD_INPUT_HANDLE), string,
sizeof(string)/sizeof(WCHAR), &count, NULL);
......
......@@ -94,7 +94,7 @@ void WCMD_title (const WCHAR *);
void WCMD_type (WCHAR *);
void WCMD_verify (const WCHAR *command);
void WCMD_version (void);
int WCMD_volume (int mode, const WCHAR *command);
int WCMD_volume (BOOL set_label, const WCHAR *command);
WCHAR *WCMD_fgets (WCHAR *s, int n, HANDLE stream);
WCHAR *WCMD_parameter (WCHAR *s, int n, WCHAR **where, WCHAR **end);
......
......@@ -1502,7 +1502,7 @@ void WCMD_execute (const WCHAR *command, const WCHAR *redirects,
WCMD_if (p, cmdList);
break;
case WCMD_LABEL:
WCMD_volume (1, p);
WCMD_volume (TRUE, p);
break;
case WCMD_MD:
case WCMD_MKDIR:
......@@ -1560,7 +1560,7 @@ void WCMD_execute (const WCHAR *command, const WCHAR *redirects,
WCMD_verify (p);
break;
case WCMD_VOL:
WCMD_volume (0, p);
WCMD_volume (FALSE, p);
break;
case WCMD_PUSHD:
WCMD_pushd(p);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment