Set right %ERRORLEVEL% value, fixing end of line for /? after implement of page break.

svn path=/trunk/; revision=16500
This commit is contained in:
Magnus Olsen 2005-07-07 22:27:30 +00:00
parent f7289e9d4a
commit daafc242e6
2 changed files with 5 additions and 1 deletions

View file

@ -276,7 +276,7 @@ GOTO label\n\n\
label Specifies a text string used in a batch script as a label.\n\n\
You type a label on a line by itself, beginning with a colon."
STRING_LABEL_HELP1, "Displays or changes drive label.\n\nLABEL [drive:][label]"
STRING_LABEL_HELP1, "Displays or changes drive label.\n\nLABEL [drive:][label]\n"
STRING_LABEL_HELP2, "Volume in drive %c: is %s\n"
STRING_LABEL_HELP3, "Volume in drive %c: has no label\n"

View file

@ -43,6 +43,8 @@ INT cmd_label (LPTSTR cmd, LPTSTR param)
return 0;
}
nErrorLevel = 0;
/* get parameters */
arg = split (param, &args, FALSE);
@ -51,6 +53,7 @@ INT cmd_label (LPTSTR cmd, LPTSTR param)
/* too many parameters */
error_too_many_parameters (arg[args - 1]);
freep (arg);
nErrorLevel = 1;
return 1;
}
@ -83,6 +86,7 @@ INT cmd_label (LPTSTR cmd, LPTSTR param)
{
error_invalid_drive ();
freep (arg);
nErrorLevel = 1;
return 1;
}