diff --git a/reactos/subsys/system/cmd/En.rc b/reactos/subsys/system/cmd/En.rc index b430927afd1..0d03ad2f356 100644 --- a/reactos/subsys/system/cmd/En.rc +++ b/reactos/subsys/system/cmd/En.rc @@ -461,6 +461,10 @@ Updates are available at: http://www.reactos.com" STRING_VERSION_HELP6, "FreeDOS version written by:\n%s\nReactOS version written by:\n%s\n" +STRING_VOL_HELP1, " Volume in drive %c: is %s" +STRING_VOL_HELP2, " Volume in drive %c: has no label" +STRING_VOL_HELP3, " Volume Serial Number is %04X-%04X\n" +STRING_VOL_HELP4, "Displays the disk volume label and serial number, if they exist.\n\nVOL [drive:]" STRING_WINDOW_HELP1, "change console window aspect\n\n \ WINDOW [/POS[=]left,top,width,heigth]\n \ @@ -480,6 +484,7 @@ MAX maximize the window\n \ RESTORE restore the window\n \ title new title" + STRING_CHOICE_OPTION, "YN" STRING_COPY_OPTION, "YNA" diff --git a/reactos/subsys/system/cmd/resource.h b/reactos/subsys/system/cmd/resource.h index 87235ca44c7..2756f1c972c 100644 --- a/reactos/subsys/system/cmd/resource.h +++ b/reactos/subsys/system/cmd/resource.h @@ -199,8 +199,13 @@ #define STRING_VERSION_HELP5 691 #define STRING_VERSION_HELP6 692 -#define STRING_WINDOW_HELP1 693 -#define STRING_WINDOW_HELP2 694 +#define STRING_VOL_HELP1 693 +#define STRING_VOL_HELP2 694 +#define STRING_VOL_HELP3 695 +#define STRING_VOL_HELP4 696 + +#define STRING_WINDOW_HELP1 697 +#define STRING_WINDOW_HELP2 698 #define STRING_FreeDOS_DEV 800 #define STRING_REACTOS_DEV 801 diff --git a/reactos/subsys/system/cmd/vol.c b/reactos/subsys/system/cmd/vol.c index e28cc25db26..3a074317dec 100644 --- a/reactos/subsys/system/cmd/vol.c +++ b/reactos/subsys/system/cmd/vol.c @@ -31,6 +31,8 @@ PrintVolumeHeader (LPTSTR pszRootPath) { TCHAR szVolName[80]; DWORD dwSerialNr; + WCHAR szMsg[RC_STRING_MAX_SIZE]; + /* get the volume information of the drive */ if(!GetVolumeInformation (pszRootPath, @@ -47,16 +49,27 @@ PrintVolumeHeader (LPTSTR pszRootPath) } /* print drive info */ - ConOutPrintf (_T(" Volume in drive %c:"), pszRootPath[0]); + + + if (szVolName[0] != '\0') - ConOutPrintf (_T(" is %s\n"), - szVolName); + { + LoadString( GetModuleHandle(NULL), STRING_VOL_HELP1, (LPTSTR) szMsg,sizeof(szMsg)); + ConOutPrintf ((LPTSTR)szMsg, pszRootPath[0],szVolName); + } else - ConOutPrintf (_T(" has no label\n")); + { + LoadString( GetModuleHandle(NULL), STRING_VOL_HELP2, (LPTSTR) szMsg,sizeof(szMsg)); + ConOutPrintf ((LPTSTR)szMsg, pszRootPath[0]); + } + + + /* print the volume serial number */ - ConOutPrintf (_T(" Volume Serial Number is %04X-%04X\n"), + LoadString( GetModuleHandle(NULL), STRING_VOL_HELP3, (LPTSTR) szMsg,sizeof(szMsg)); + ConOutPrintf ((LPTSTR)szMsg, HIWORD(dwSerialNr), LOWORD(dwSerialNr)); return 0; @@ -67,11 +80,13 @@ INT cmd_vol (LPTSTR cmd, LPTSTR param) { TCHAR szRootPath[] = _T("A:\\"); TCHAR szPath[MAX_PATH]; + WCHAR szMsg[RC_STRING_MAX_SIZE]; if (!_tcsncmp (param, _T("/?"), 2)) { - ConOutPuts (_T("Displays the disk volume label and serial number, if they exist.\n\n" - "VOL [drive:]")); + LoadString( GetModuleHandle(NULL), STRING_VOL_HELP4, (LPTSTR) szMsg,sizeof(szMsg)); + ConOutPuts ((LPTSTR)szMsg); + return 0; }