diff options
author | mmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-14 00:41:45 +0000 |
---|---|---|
committer | mmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-14 00:41:45 +0000 |
commit | 5115474e2e2c773b53fc1e111426e8924deeadb7 (patch) | |
tree | 6bdd56cdd544a3b331db7612781ae347739c4e82 /sandbox/tools | |
parent | 609990b5b4254601504935427483e3fc22cfde80 (diff) | |
download | chromium_src-5115474e2e2c773b53fc1e111426e8924deeadb7.zip chromium_src-5115474e2e2c773b53fc1e111426e8924deeadb7.tar.gz chromium_src-5115474e2e2c773b53fc1e111426e8924deeadb7.tar.bz2 |
Use %ls instead of %s in wprintf format strings for wchar_t fields.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@846 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox/tools')
-rw-r--r-- | sandbox/tools/finder/main.cc | 10 | ||||
-rw-r--r-- | sandbox/tools/launcher/launcher.cc | 12 |
2 files changed, 11 insertions, 11 deletions
diff --git a/sandbox/tools/finder/main.cc b/sandbox/tools/finder/main.cc index 7037bfa..75e081d 100644 --- a/sandbox/tools/finder/main.cc +++ b/sandbox/tools/finder/main.cc @@ -33,13 +33,13 @@ #define PARAM_IS(y) (argc > i) && (_wcsicmp(argv[i], y) == 0) void PrintUsage(wchar_t *application_name) { - wprintf(L"\n\nUsage: \n %s --token type --object ob1 [ob2 ob3] " + wprintf(L"\n\nUsage: \n %ls --token type --object ob1 [ob2 ob3] " L"--access ac1 [ac2 ac3] [--log filename]", application_name); wprintf(L"\n\n Token Types : \n\tLOCKDOWN \n\tRESTRICTED " L"\n\tLIMITED_USER \n\tINTERACTIVE_USER \n\tNON_ADMIN \n\tUNPROTECTED"); wprintf(L"\n Object Types: \n\tREG \n\tFILE \n\tKERNEL"); wprintf(L"\n Access Types: \n\tR \n\tW \n\tALL"); - wprintf(L"\n\nSample: \n %s --token LOCKDOWN --object REG FILE KERNEL " + wprintf(L"\n\nSample: \n %ls --token LOCKDOWN --object REG FILE KERNEL " L"--access R W ALL", application_name); } @@ -84,7 +84,7 @@ int wmain(int argc, wchar_t* argv[]) { } else if (PARAM_IS(L"UNPROTECTED")) { token_type = sandbox::USER_UNPROTECTED; } else { - wprintf(L"\nAbord. Invalid token type \"%s\"", argv[i]); + wprintf(L"\nAbord. Invalid token type \"%ls\"", argv[i]); PrintUsage(app_name); return -1; } @@ -130,7 +130,7 @@ int wmain(int argc, wchar_t* argv[]) { return -1; } } else { - wprintf(L"\nAbord. Unrecognized parameter \"%s\"", argv[i]); + wprintf(L"\nAbord. Unrecognized parameter \"%ls\"", argv[i]); PrintUsage(app_name); return -1; } @@ -155,7 +155,7 @@ int wmain(int argc, wchar_t* argv[]) { if (log_file.GetLength()) { errno_t err = _wfopen_s(&file_output, log_file, L"w"); if (err) { - wprintf(L"\nAbord, Cannot open file \"%s\"", log_file.GetBuffer()); + wprintf(L"\nAbord, Cannot open file \"%ls\"", log_file.GetBuffer()); return -1; } } else { diff --git a/sandbox/tools/launcher/launcher.cc b/sandbox/tools/launcher/launcher.cc index 3e7dd3d..fd8d272 100644 --- a/sandbox/tools/launcher/launcher.cc +++ b/sandbox/tools/launcher/launcher.cc @@ -39,7 +39,7 @@ #define PARAM_IS(y) (argc > i) && (_wcsicmp(argv[i], y) == 0) void PrintUsage(const wchar_t *application_name) { - wprintf(L"\n\nUsage: \n %s --main level --init level --job level cmd_line ", + wprintf(L"\n\nUsage: \n %ls --main level --init level --job level cmd_line ", application_name); wprintf(L"\n\n Levels : \n\tLOCKDOWN \n\tRESTRICTED " L"\n\tLIMITED_USER \n\tINTERACTIVE_USER \n\tNON_ADMIN \n\tUNPROTECTED"); @@ -119,7 +119,7 @@ int wmain(int argc, wchar_t *argv[]) { i++; if (argc > i) { if (!GetTokenLevelFromString(argv[i], &primary_level)) { - wprintf(L"\nAbord, Unrecognized main token level \"%s\"", argv[i]); + wprintf(L"\nAbord, Unrecognized main token level \"%ls\"", argv[i]); PrintUsage(app_name); return -1; } @@ -128,7 +128,7 @@ int wmain(int argc, wchar_t *argv[]) { i++; if (argc > i) { if (!GetTokenLevelFromString(argv[i], &impersonation_level)) { - wprintf(L"\nAbord, Unrecognized init token level \"%s\"", argv[i]); + wprintf(L"\nAbord, Unrecognized init token level \"%ls\"", argv[i]); PrintUsage(app_name); return -1; } @@ -137,7 +137,7 @@ int wmain(int argc, wchar_t *argv[]) { i++; if (argc > i) { if (!GetJobLevelFromString(argv[i], &job_level)) { - wprintf(L"\nAbord, Unrecognized job security level \"%s\"", argv[i]); + wprintf(L"\nAbord, Unrecognized job security level \"%ls\"", argv[i]); PrintUsage(app_name); return -1; } @@ -156,7 +156,7 @@ int wmain(int argc, wchar_t *argv[]) { return -1; } - wprintf(L"\nLaunching command line: \"%s\"\n", command_line.GetBuffer()); + wprintf(L"\nLaunching command line: \"%ls\"\n", command_line.GetBuffer()); HANDLE job_handle; DWORD err_code = sandbox::StartRestrictedProcessInJob( @@ -178,4 +178,4 @@ int wmain(int argc, wchar_t *argv[]) { ::CloseHandle(job_handle); return 0; -}
\ No newline at end of file +} |