set right value of %ERRORLEVEL% for vol

svn path=/trunk/; revision=16496
This commit is contained in:
Magnus Olsen 2005-07-07 19:51:09 +00:00
parent bff830321b
commit 2bd961bd1d

View file

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