Author: mturk Date: Thu Aug 13 21:47:06 2009 New Revision: 804036 URL: http://svn.apache.org/viewvc?rev=804036&view=rev Log: Fix formating
Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/signals.c commons/sandbox/runtime/trunk/src/main/native/os/win32/main.c commons/sandbox/runtime/trunk/src/main/native/os/win32/signals.c Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/signals.c URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/signals.c?rev=804036&r1=804035&r2=804036&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/native/os/unix/signals.c (original) +++ commons/sandbox/runtime/trunk/src/main/native/os/unix/signals.c Thu Aug 13 21:47:06 2009 @@ -45,6 +45,6 @@ if (signum >= 0 && signum < ACR_NUMSIG) return sys_siglist[signum]; else - return "unknown signal (number)"; + return "Unknown signal (number)"; } Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/main.c URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/main.c?rev=804036&r1=804035&r2=804036&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/native/os/win32/main.c (original) +++ commons/sandbox/runtime/trunk/src/main/native/os/win32/main.c Thu Aug 13 21:47:06 2009 @@ -136,8 +136,8 @@ }; static HMODULE late_dll_handles[SYSDLL_defined] = { - NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL }; FARPROC acr_load_dll_func(acr_dlltoken_e fnLib, const char* fnName, int ordinal) @@ -223,9 +223,8 @@ static const wchar_t *sePrivileges[] = { L"SeBackupPrivilege", - L"SeCreateGlobalPrivilege", + L"SeCreateGlobalPrivilege", /* Create shared memory in Global namespace */ L"SeCreateSymbolicLinkPrivilege", - L"SeCreateTokenPrivilege", L"SeDebugPrivilege", L"SeTakeOwnershipPrivilege", NULL @@ -236,10 +235,8 @@ { DWORD rc; UINT em; - const wchar_t **pp = &sePrivileges[0]; + int i = 0; - if (initialized++) - return 0; acr_pvm = vm; GetSystemInfo(acr_osinf); @@ -254,19 +251,25 @@ L"Failed loading system libraries", rc); return (int)rc; } + + /* Up to here we can be called multiple times. + */ + if (initialized++) + return 0; + /* Allocate a TLS index. */ if ((dll_tls_index = TlsAlloc()) == TLS_OUT_OF_INDEXES) { return ACR_GET_OS_ERROR(); } - while (*pp) { - if ((rc = ACR_EnablePrivilege(*pp)) != ERROR_SUCCESS) { + while (sePrivileges[i]) { + if ((rc = ACR_EnablePrivilege(sePrivileges[i])) != ERROR_SUCCESS) { WCHAR buf[128]; - swprintf(buf, L"Failed enabling %s", *pp); + swprintf(buf, L"Failed enabling %s", sePrivileges[i]); /* Log that we couldn't set privilege */ acr_init_log_source(LOG_MSG_DOMAIN); do_syslog(ACR_LOG_WARN, buf, rc); } - ++pp; + i++; } /* * Create a simple unnamed signaling event. Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/signals.c URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/signals.c?rev=804036&r1=804035&r2=804036&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/native/os/win32/signals.c (original) +++ commons/sandbox/runtime/trunk/src/main/native/os/win32/signals.c Thu Aug 13 21:47:06 2009 @@ -45,30 +45,30 @@ "Trace trap (not reset when caught)", "Abort()", "EMT instruction", - "floating point exception", - "kill (cannot be caught or ignored)", - "bus error", - "segmentation violation", - "bad argument to system call", - "write on a pipe with no one to read it", - "alarm clock", - "software termination signal from kill", - "urgent condition on IO channel", - "sendable stop signal not from tty", - "stop signal from tty", - "continue a stopped process", - "to parent on child stop or exit", - "to readers pgrp upon background tty read", - "like TTIN for output if (tp->t_local<OSTOP)", - "input/output possible signal", - "exceeded CPU time limit", - "exceeded file size limit", - "virtual time alarm", - "profiling time alarm", - "window size changes", - "information request", - "user defined signal 1", - "user defined signal 2" + "Floating point exception", + "Kill (cannot be caught or ignored)", + "Bus error", + "Segmentation violation", + "Bad argument to system call", + "Write on a pipe with no one to read it", + "Alarm clock", + "Software termination signal from kill", + "Urgent condition on IO channel", + "Sendable stop signal not from tty", + "Stop signal from tty", + "Continue a stopped process", + "To parent on child stop or exit", + "To readers pgrp upon background tty read", + "Like TTIN for output if (tp->t_local<OSTOP)", + "Input/output possible signal", + "Exceeded CPU time limit", + "Exceeded file size limit", + "Virtual time alarm", + "Profiling time alarm", + "Window size changes", + "Information request", + "User defined signal 1", + "User defined signal 2" }; void acr_SignalInit() @@ -81,7 +81,7 @@ if (signum >= 0 && signum < ACR_NUMSIG) return signal_description[signum]; else - return "unknown signal (number)"; + return "Unknown signal (number)"; }