cmd: Improve WCMD_volume documentation.

This commit is contained in:
Frédéric Delanoy 2011-09-21 21:17:18 +02:00 committed by Alexandre Julliard
parent e9a8b751b5
commit a536004f34
3 changed files with 9 additions and 7 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);