mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
set right value of %ERRORLEVEL% for vol
svn path=/trunk/; revision=16496
This commit is contained in:
parent
bff830321b
commit
2bd961bd1d
1 changed files with 9 additions and 3 deletions
|
@ -43,7 +43,7 @@ PrintVolumeHeader (LPTSTR pszRootPath)
|
|||
NULL,
|
||||
0))
|
||||
{
|
||||
ErrorMessage (GetLastError (), _T(""));
|
||||
ErrorMessage (GetLastError (), _T(""));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -77,6 +77,8 @@ INT cmd_vol (LPTSTR cmd, LPTSTR param)
|
|||
return 0;
|
||||
}
|
||||
|
||||
nErrorLevel = 0;
|
||||
|
||||
if (param[0] == _T('\0'))
|
||||
{
|
||||
GetCurrentDirectory (MAX_PATH, szPath);
|
||||
|
@ -89,20 +91,24 @@ INT cmd_vol (LPTSTR cmd, LPTSTR param)
|
|||
szRootPath[0] = param[0];
|
||||
else
|
||||
{
|
||||
error_invalid_drive ();
|
||||
error_invalid_drive ();
|
||||
nErrorLevel = 1;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!IsValidPathName (szRootPath))
|
||||
{
|
||||
error_invalid_drive ();
|
||||
error_invalid_drive ();
|
||||
nErrorLevel = 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* print the header */
|
||||
if (!PrintVolumeHeader (szRootPath))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue