set right value of %ERRORLEVEL% for vol Modified: trunk/reactos/subsys/system/cmd/vol.c _____
Modified: trunk/reactos/subsys/system/cmd/vol.c --- trunk/reactos/subsys/system/cmd/vol.c 2005-07-07 19:26:46 UTC (rev 16495) +++ trunk/reactos/subsys/system/cmd/vol.c 2005-07-07 19:51:09 UTC (rev 16496) @@ -43,7 +43,7 @@
NULL, 0)) { - ErrorMessage (GetLastError (), _T("")); + ErrorMessage (GetLastError (), _T("")); return 1; }
@@ -77,6 +77,8 @@ return 0; }
+ nErrorLevel = 0; + if (param[0] == _T('\0')) { GetCurrentDirectory (MAX_PATH, szPath); @@ -89,20 +91,24 @@ 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; }