From 0cd9f74fa5f16ff9573ae52a01296b90b02a9324 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Fri, 3 Sep 2004 01:53:12 +0000 Subject: [PATCH] Regularize most strace_prints throughout so that %E is always preceded by a comma and elminate most uses of "foo = %s" to "foo %s". --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/dlfcn.cc | 2 +- winsup/cygwin/exceptions.cc | 4 ++-- winsup/cygwin/fhandler_mem.cc | 2 +- winsup/cygwin/fhandler_proc.cc | 9 +++------ winsup/cygwin/fhandler_process.cc | 20 +++++++------------- winsup/cygwin/fhandler_socket.cc | 4 ++-- winsup/cygwin/fhandler_tape.cc | 4 ++-- winsup/cygwin/init.cc | 4 ++-- winsup/cygwin/mmap.cc | 13 ++++++------- winsup/cygwin/path.cc | 2 +- winsup/cygwin/security.cc | 26 +++++++++++++------------- winsup/cygwin/spawn.cc | 6 +++--- winsup/cygwin/syscalls.cc | 21 ++++++++++----------- winsup/cygwin/sysconf.cc | 6 ++---- winsup/cygwin/tty.cc | 2 +- winsup/cygwin/uinfo.cc | 16 ++++++++-------- winsup/cygwin/wait.cc | 2 +- 18 files changed, 70 insertions(+), 78 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index af0c5f11d..024a3d0fc 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2004-09-02 Christopher Faylor + + Regularize most strace_prints throughout so that %E is always preceded + by a comma and elminate most uses of "foo = %s" to "foo %s". + 2004-09-02 Bob Byrnes Christopher Faylor diff --git a/winsup/cygwin/dlfcn.cc b/winsup/cygwin/dlfcn.cc index 9202d1139..e57bb6328 100644 --- a/winsup/cygwin/dlfcn.cc +++ b/winsup/cygwin/dlfcn.cc @@ -26,7 +26,7 @@ details. */ static void __stdcall set_dl_error (const char *str) { - __small_sprintf (_my_tls.locals.dl_buffer, "%s: %E", str); + __small_sprintf (_my_tls.locals.dl_buffer, "%s, %E", str); _my_tls.locals.dl_error = 1; } diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 66879ee4b..64846553a 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -364,7 +364,7 @@ try_to_debug (bool waitloop) &pi); if (!dbg) - system_printf ("Failed to start debugger: %E"); + system_printf ("Failed to start debugger, %E"); else { if (!waitloop) @@ -490,7 +490,7 @@ handle_exceptions (EXCEPTION_RECORD *e0, void *frame, CONTEXT *in0, void *) } debug_printf ("In cygwin_except_handler exc %p at %p sp %p", e.ExceptionCode, in.Eip, in.Esp); - debug_printf ("In cygwin_except_handler sig = %d at %p", si.si_signo, in.Eip); + debug_printf ("In cygwin_except_handler sig %d at %p", si.si_signo, in.Eip); if (global_sigs[si.si_signo].sa_mask & SIGTOMASK (si.si_signo)) syscall_printf ("signal %d, masked %p", si.si_signo, diff --git a/winsup/cygwin/fhandler_mem.cc b/winsup/cygwin/fhandler_mem.cc index 64bf8e5ec..68532c6dd 100644 --- a/winsup/cygwin/fhandler_mem.cc +++ b/winsup/cygwin/fhandler_mem.cc @@ -49,7 +49,7 @@ fhandler_dev_mem::open (int flags, mode_t) sizeof sbi, NULL)) != STATUS_SUCCESS) { __seterrno_from_win_error (RtlNtStatusToDosError (ret)); - debug_printf("NtQuerySystemInformation: ret = %d, Dos(ret) = %d", + debug_printf("NtQuerySystemInformation: ret %d, Dos(ret) %d", ret, RtlNtStatusToDosError (ret)); mem_size = 0; } diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index 492e86cb5..464d67d04 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -465,8 +465,7 @@ format_proc_uptime (char *destbuf, size_t maxsize) else if (ret != STATUS_SUCCESS) { __seterrno_from_win_error (RtlNtStatusToDosError (ret)); - debug_printf("NtQuerySystemInformation: ret = %d, " - "Dos(ret) = %d", + debug_printf("NtQuerySystemInformation: ret %d, Dos(ret) %d", ret, RtlNtStatusToDosError (ret)); return 0; } @@ -503,8 +502,7 @@ format_proc_stat (char *destbuf, size_t maxsize) != STATUS_SUCCESS) { __seterrno_from_win_error (RtlNtStatusToDosError (ret)); - debug_printf ("NtQuerySystemInformation: ret = %d, " - "Dos(ret) = %d", + debug_printf ("NtQuerySystemInformation: ret %d, Dos(ret) %d", ret, RtlNtStatusToDosError (ret)); sbi.NumberProcessors = 1; } @@ -546,8 +544,7 @@ format_proc_stat (char *destbuf, size_t maxsize) if (ret != STATUS_SUCCESS) { __seterrno_from_win_error (RtlNtStatusToDosError (ret)); - debug_printf("NtQuerySystemInformation: ret = %d, " - "Dos(ret) = %d", + debug_printf("NtQuerySystemInformation: ret %d, Dos(ret) %d", ret, RtlNtStatusToDosError (ret)); return 0; } diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc index 745600713..e56b85357 100644 --- a/winsup/cygwin/fhandler_process.cc +++ b/winsup/cygwin/fhandler_process.cc @@ -441,8 +441,7 @@ format_process_stat (_pinfo *p, char *destbuf, size_t maxsize) { DWORD error = GetLastError (); __seterrno_from_win_error (error); - debug_printf ("OpenProcess: ret = %d", - error); + debug_printf ("OpenProcess: ret %d", error); return 0; } if (ret == STATUS_SUCCESS) @@ -456,8 +455,7 @@ format_process_stat (_pinfo *p, char *destbuf, size_t maxsize) if (ret != STATUS_SUCCESS) { __seterrno_from_win_error (RtlNtStatusToDosError (ret)); - debug_printf ("NtQueryInformationProcess: ret = %d, " - "Dos(ret) = %d", + debug_printf ("NtQueryInformationProcess: ret %d, Dos(ret) %d", ret, RtlNtStatusToDosError (ret)); return 0; } @@ -630,9 +628,8 @@ get_process_state (DWORD dwProcessId) delete [] p, p = new ULONG[n *= 2]; if (ret != STATUS_SUCCESS) { - debug_printf ("NtQuerySystemInformation: ret = %d, " - "Dos(ret) = %d", - ret, RtlNtStatusToDosError (ret)); + debug_printf ("NtQuerySystemInformation: ret %d, Dos(ret) %d", + ret, RtlNtStatusToDosError (ret)); goto out; } state = 'Z'; @@ -696,8 +693,7 @@ get_mem_values (DWORD dwProcessId, unsigned long *vmsize, unsigned long *vmrss, { DWORD error = GetLastError (); __seterrno_from_win_error (error); - debug_printf ("OpenProcess: ret = %d", - error); + debug_printf ("OpenProcess: ret %d", error); return false; } while ((ret = NtQueryVirtualMemory (hProcess, 0, @@ -709,8 +705,7 @@ get_mem_values (DWORD dwProcessId, unsigned long *vmsize, unsigned long *vmrss, delete [] p, p = new ULONG[n *= 2]; if (ret != STATUS_SUCCESS) { - debug_printf ("NtQueryVirtualMemory: ret = %d, " - "Dos(ret) = %d", + debug_printf ("NtQueryVirtualMemory: ret %d, Dos(ret) %d", ret, RtlNtStatusToDosError (ret)); res = false; goto out; @@ -735,8 +730,7 @@ get_mem_values (DWORD dwProcessId, unsigned long *vmsize, unsigned long *vmrss, sizeof vmc, NULL); if (ret != STATUS_SUCCESS) { - debug_printf ("NtQueryInformationProcess: ret = %d, " - "Dos(ret) = %d", + debug_printf ("NtQueryInformationProcess: ret %d, Dos(ret) %d", ret, RtlNtStatusToDosError (ret)); res = false; goto out; diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc index b8ec37bdc..5c85ad413 100644 --- a/winsup/cygwin/fhandler_socket.cc +++ b/winsup/cygwin/fhandler_socket.cc @@ -706,12 +706,12 @@ fhandler_socket::prepare (HANDLE &event, long event_mask) closed (false); if ((event = WSACreateEvent ()) == WSA_INVALID_EVENT) { - debug_printf ("WSACreateEvent: %E"); + debug_printf ("WSACreateEvent, %E"); return false; } if (WSAEventSelect (get_socket (), event, event_mask) == SOCKET_ERROR) { - debug_printf ("WSAEventSelect: %E"); + debug_printf ("WSAEventSelect, %E"); return false; } return true; diff --git a/winsup/cygwin/fhandler_tape.cc b/winsup/cygwin/fhandler_tape.cc index c86b0f400..ea8853722 100644 --- a/winsup/cygwin/fhandler_tape.cc +++ b/winsup/cygwin/fhandler_tape.cc @@ -1307,7 +1307,7 @@ fhandler_dev_tape::raw_read (void *ptr, size_t &ulen) if (len > 0) { if (!mt_evt && !(mt_evt = CreateEvent (&sec_none, TRUE, FALSE, NULL))) - debug_printf ("Creating event failed: %E"); + debug_printf ("Creating event failed, %E"); size_t block_fit = !block_size ? len : rounddown(len, block_size); if (block_fit) { @@ -1359,7 +1359,7 @@ fhandler_dev_tape::raw_write (const void *ptr, size_t len) { lock (-1); if (!mt_evt && !(mt_evt = CreateEvent (&sec_none, TRUE, FALSE, NULL))) - debug_printf ("Creating event failed: %E"); + debug_printf ("Creating event failed, %E"); int ret = mt->drive (driveno ())->write (get_handle (), mt_evt, ptr, len); if (ret) __seterrno_from_win_error (ret); diff --git a/winsup/cygwin/init.cc b/winsup/cygwin/init.cc index c1e98a8a6..d0842a7ed 100644 --- a/winsup/cygwin/init.cc +++ b/winsup/cygwin/init.cc @@ -97,10 +97,10 @@ respawn_wow64_process () CREATE_DEFAULT_ERROR_MODE | GetPriorityClass (GetCurrentProcess ()), NULL, NULL, &si, &pi)) - api_fatal ("Failed to create process <%s>: %E", GetCommandLineA ()); + api_fatal ("Failed to create process <%s>, %E", GetCommandLineA ()); CloseHandle (pi.hThread); if (WaitForSingleObject (pi.hProcess, INFINITE) == WAIT_FAILED) - api_fatal ("Waiting for process %d failed: %E", pi.dwProcessId); + api_fatal ("Waiting for process %d failed, %E", pi.dwProcessId); CloseHandle (pi.hProcess); ExitProcess (0); } diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc index ebca63d59..ae6a78d1d 100644 --- a/winsup/cygwin/mmap.cc +++ b/winsup/cygwin/mmap.cc @@ -178,12 +178,12 @@ mmap_record::alloc_page_map (_off64_t off, DWORD len) if (off > 0 && !VirtualProtect (base_address_, off, PAGE_NOACCESS, &old_prot)) - syscall_printf ("VirtualProtect(%x,%D) failed: %E", base_address_, off); + syscall_printf ("VirtualProtect(%x,%D) failed, %E", base_address_, off); if (off + vlen < size_to_map_ && !VirtualProtect (base_address_ + off + vlen, size_to_map_ - vlen - off, PAGE_NOACCESS, &old_prot)) - syscall_printf ("VirtualProtect(%x,%D) failed: %E", + syscall_printf ("VirtualProtect(%x,%D) failed, %E", base_address_ + off + vlen, size_to_map_ - vlen - off); } @@ -243,7 +243,7 @@ mmap_record::unmap_pages (caddr_t addr, DWORD len) if (wincap.virtual_protect_works_on_shared_pages () && !VirtualProtect (base_address_ + off * getpagesize (), len * getpagesize (), PAGE_NOACCESS, &old_prot)) - syscall_printf ("-1 = unmap_pages (): %E"); + syscall_printf ("-1 = unmap_pages (), %E"); for (; len-- > 0; ++off) MAP_CLR (off); @@ -705,8 +705,7 @@ munmap (void *addr, size_t len) extern "C" int msync (void *addr, size_t len, int flags) { - syscall_printf ("addr = %x, len = %u, flags = %x", - addr, len, flags); + syscall_printf ("addr %x, len %u, flags %x", addr, len, flags); /* However, check flags for validity. */ if ((flags & ~(MS_ASYNC | MS_SYNC | MS_INVALIDATE)) @@ -752,7 +751,7 @@ msync (void *addr, size_t len, int flags) rec->free_fh (fh); if (ret) - syscall_printf ("%d = msync(): %E", ret); + syscall_printf ("%d = msync(), %E", ret); else syscall_printf ("0 = msync()"); @@ -836,7 +835,7 @@ mprotect (void *addr, size_t len, int prot) if (VirtualProtect (addr, len, new_prot, &old_prot) == 0) { __seterrno (); - syscall_printf ("-1 = mprotect (): %E"); + syscall_printf ("-1 = mprotect (), %E"); return -1; } diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index c348268b6..d70dd59a9 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -1529,7 +1529,7 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev, rc = 0; else { - debug_printf ("attempt to access outside of chroot '%s = %s'", + debug_printf ("attempt to access outside of chroot '%s - %s'", cygheap->root.posix_path (), cygheap->root.native_path ()); rc = ENOENT; } diff --git a/winsup/cygwin/security.cc b/winsup/cygwin/security.cc index c0ffadc00..378be66ae 100644 --- a/winsup/cygwin/security.cc +++ b/winsup/cygwin/security.cc @@ -344,7 +344,7 @@ get_user_groups (WCHAR *wlogonserver, cygsidlist &grp_list, char *user, sys_wcstombs (dgroup + len, buf[i].grui0_name, GNLEN + 1); if (!LookupAccountName (NULL, dgroup, gsid, &glen, domain, &dlen, &use)) - debug_printf ("LookupAccountName(%s): %E", dgroup); + debug_printf ("LookupAccountName(%s), %E", dgroup); else if (legal_sid_type (use)) grp_list += gsid; else @@ -424,11 +424,11 @@ get_user_local_groups (cygsidlist &grp_list, PSID pusersid) if (!LookupAccountName (NULL, bgroup, gsid, &glen, domain, &dlen, &use)) { if (GetLastError () != ERROR_NONE_MAPPED) - debug_printf ("LookupAccountName(%s): %E", bgroup); + debug_printf ("LookupAccountName(%s), %E", bgroup); strcpy (lgroup + llen, bgroup + blen); if (!LookupAccountName (NULL, lgroup, gsid, &glen, domain, &dlen, &use)) - debug_printf ("LookupAccountName(%s): %E", lgroup); + debug_printf ("LookupAccountName(%s), %E", lgroup); } if (!legal_sid_type (use)) debug_printf ("Rejecting local %s. use: %d", bgroup + blen, use); @@ -730,7 +730,7 @@ verify_token (HANDLE token, cygsid &usersid, user_groups &groups, bool *pintern) TOKEN_SOURCE ts; if (!GetTokenInformation (token, TokenSource, &ts, sizeof ts, &size)) - debug_printf ("GetTokenInformation(): %E"); + debug_printf ("GetTokenInformation(), %E"); else *pintern = intern = !memcmp (ts.SourceName, "Cygwin.1", 8); } @@ -738,7 +738,7 @@ verify_token (HANDLE token, cygsid &usersid, user_groups &groups, bool *pintern) cygsid tok_usersid = NO_SID; if (!GetTokenInformation (token, TokenUser, &tok_usersid, sizeof tok_usersid, &size)) - debug_printf ("GetTokenInformation(): %E"); + debug_printf ("GetTokenInformation(), %E"); if (usersid != tok_usersid) return false; @@ -751,10 +751,10 @@ verify_token (HANDLE token, cygsid &usersid, user_groups &groups, bool *pintern) if (!GetKernelObjectSecurity (token, GROUP_SECURITY_INFORMATION, (PSECURITY_DESCRIPTOR) sd_buf, sizeof sd_buf, &size)) - debug_printf ("GetKernelObjectSecurity(): %E"); + debug_printf ("GetKernelObjectSecurity(), %E"); else if (!GetSecurityDescriptorGroup ((PSECURITY_DESCRIPTOR) sd_buf, (PSID *) &gsid, (BOOL *) &size)) - debug_printf ("GetSecurityDescriptorGroup(): %E"); + debug_printf ("GetSecurityDescriptorGroup(), %E"); if (well_known_null_sid != gsid) return gsid == groups.pgsid; } @@ -765,11 +765,11 @@ verify_token (HANDLE token, cygsid &usersid, user_groups &groups, bool *pintern) if (!GetTokenInformation (token, TokenGroups, NULL, 0, &size) && GetLastError () != ERROR_INSUFFICIENT_BUFFER) - debug_printf ("GetTokenInformation(token, TokenGroups): %E"); + debug_printf ("GetTokenInformation(token, TokenGroups), %E"); else if (!(my_grps = (PTOKEN_GROUPS) alloca (size))) debug_printf ("alloca (my_grps) failed."); else if (!GetTokenInformation (token, TokenGroups, my_grps, size, &size)) - debug_printf ("GetTokenInformation(my_token, TokenGroups): %E"); + debug_printf ("GetTokenInformation(my_token, TokenGroups), %E"); else if (!groups.issetgroups ()) /* setgroups was never called */ ret = sid_in_token_groups (my_grps, groups.pgsid) || groups.pgsid == usersid; @@ -859,7 +859,7 @@ create_token (cygsid &usersid, user_groups &new_groups, struct passwd *pw) /* Retrieve authentication id and group list from own process. */ if (!OpenProcessToken (hMainProc, TOKEN_QUERY, &my_token)) - debug_printf ("OpenProcessToken(my_token): %E"); + debug_printf ("OpenProcessToken(my_token), %E"); else { /* Switching user context to SYSTEM doesn't inherit the authentication @@ -868,7 +868,7 @@ create_token (cygsid &usersid, user_groups &new_groups, struct passwd *pw) if (!GetTokenInformation (my_token, TokenStatistics, &stats, sizeof stats, &size)) debug_printf - ("GetTokenInformation(my_token, TokenStatistics): %E"); + ("GetTokenInformation(my_token, TokenStatistics), %E"); else auth_luid = stats.AuthenticationId; @@ -876,13 +876,13 @@ create_token (cygsid &usersid, user_groups &new_groups, struct passwd *pw) some important well known group sids. */ if (!GetTokenInformation (my_token, TokenGroups, NULL, 0, &size) && GetLastError () != ERROR_INSUFFICIENT_BUFFER) - debug_printf ("GetTokenInformation(my_token, TokenGroups): %E"); + debug_printf ("GetTokenInformation(my_token, TokenGroups), %E"); else if (!(my_tok_gsids = (PTOKEN_GROUPS) malloc (size))) debug_printf ("malloc (my_tok_gsids) failed."); else if (!GetTokenInformation (my_token, TokenGroups, my_tok_gsids, size, &size)) { - debug_printf ("GetTokenInformation(my_token, TokenGroups): %E"); + debug_printf ("GetTokenInformation(my_token, TokenGroups), %E"); free (my_tok_gsids); my_tok_gsids = NULL; } diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index b7b136b2b..4e876c8d0 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -866,9 +866,9 @@ spawn_guts (const char * prog_arg, const char *const *argv, nwait, myself->pid, myself->dwProcessId); system_printf ("waitbuf[0] %p %d", waitbuf[0], WaitForSingleObject (waitbuf[0], 0)); - system_printf ("waitbuf[1] %p = %d", waitbuf[1], + system_printf ("waitbuf[1] %p %d", waitbuf[1], WaitForSingleObject (waitbuf[1], 0)); - system_printf ("waitbuf[w] %p = %d", waitbuf[2], + system_printf ("waitbuf[w] %p %d", waitbuf[2], WaitForSingleObject (waitbuf[2], 0)); set_errno (ECHILD); try_to_debug (); @@ -879,7 +879,7 @@ spawn_guts (const char * prog_arg, const char *const *argv, ForceCloseHandle (subproc_ready); - sigproc_printf ("res = %x", res); + sigproc_printf ("res %p", res); if (res & EXIT_REPARENTING) { diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index d928bd6e4..b98db3a71 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -1978,10 +1978,9 @@ mknod (const char *_path, mode_t mode, __dev16_t dev) } extern "C" int -mkfifo (const char *_path, mode_t mode) +mkfifo (const char *path, mode_t mode) { - set_errno (ENOSYS); // FIXME - return -1; + return mknod32 (path, (mode & ~S_IFMT) | S_IFIFO, 0); } /* seteuid: standards? */ @@ -2049,7 +2048,7 @@ seteuid32 (__uid32_t uid) if (!SetTokenInformation (ptok, TokenDefaultDacl, &tdacl, sizeof dacl_buf)) debug_printf ("SetTokenInformation" - "(TokenDefaultDacl): %E"); + "(TokenDefaultDacl), %E"); } /* If no impersonation token is available, try to @@ -2079,17 +2078,17 @@ seteuid32 (__uid32_t uid) if (!SetTokenInformation (new_token, TokenOwner, &usersid, sizeof usersid)) debug_printf ("SetTokenInformation(user.token, " - "TokenOwner): %E"); + "TokenOwner), %E"); /* Try setting primary group in token to current group */ if (!SetTokenInformation (new_token, TokenPrimaryGroup, &groups.pgsid, sizeof (cygsid))) debug_printf ("SetTokenInformation(user.token, " - "TokenPrimaryGroup): %E"); + "TokenPrimaryGroup), %E"); /* Try setting default DACL */ if (tdacl.DefaultDacl && !SetTokenInformation (new_token, TokenDefaultDacl, &tdacl, sizeof (tdacl))) - debug_printf ("SetTokenInformation (TokenDefaultDacl): %E"); + debug_printf ("SetTokenInformation (TokenDefaultDacl), %E"); } CloseHandle (ptok); @@ -2196,22 +2195,22 @@ setegid32 (__gid32_t gid) TokenPrimaryGroup, &gsid, sizeof gsid)) debug_printf ("SetTokenInformation(thread, " - "TokenPrimaryGroup): %E"); + "TokenPrimaryGroup), %E"); RevertToSelf (); } if (!OpenProcessToken (hMainProc, TOKEN_ADJUST_DEFAULT, &ptok)) - debug_printf ("OpenProcessToken(): %E"); + debug_printf ("OpenProcessToken(), %E"); else { if (!SetTokenInformation (ptok, TokenPrimaryGroup, &gsid, sizeof gsid)) debug_printf ("SetTokenInformation(process, " - "TokenPrimaryGroup): %E"); + "TokenPrimaryGroup), %E"); CloseHandle (ptok); } if (cygheap->user.issetuid () && !ImpersonateLoggedOnUser (cygheap->user.token ())) - system_printf ("Impersonating in setegid failed: %E"); + system_printf ("Impersonating in setegid failed, %E"); return 0; } diff --git a/winsup/cygwin/sysconf.cc b/winsup/cygwin/sysconf.cc index 66e4fc441..7a7671a84 100644 --- a/winsup/cygwin/sysconf.cc +++ b/winsup/cygwin/sysconf.cc @@ -80,8 +80,7 @@ sysconf (int in) != STATUS_SUCCESS) { __seterrno_from_win_error (RtlNtStatusToDosError (ret)); - debug_printf ("NtQuerySystemInformation: ret = %d, " - "Dos(ret) = %d", + debug_printf ("NtQuerySystemInformation: ret %d, Dos(ret) %d", ret, RtlNtStatusToDosError (ret)); return -1; } @@ -114,8 +113,7 @@ sysconf (int in) != STATUS_SUCCESS) { __seterrno_from_win_error (RtlNtStatusToDosError (ret)); - debug_printf ("NtQuerySystemInformation: ret = %d, " - "Dos(ret) = %d", + debug_printf ("NtQuerySystemInformation: ret %d, Dos(ret) %d", ret, RtlNtStatusToDosError (ret)); return -1; } diff --git a/winsup/cygwin/tty.cc b/winsup/cygwin/tty.cc index eea5ec42e..edad95c71 100644 --- a/winsup/cygwin/tty.cc +++ b/winsup/cygwin/tty.cc @@ -353,7 +353,7 @@ tty::create_inuse (const char *fmt) shared_name (buf, fmt, ntty); h = CreateEvent (&sec_all, TRUE, FALSE, buf); - termios_printf ("%s = %p", buf, h); + termios_printf ("%s %p", buf, h); if (!h) termios_printf ("couldn't open inuse event, %E", buf); return h; diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index 4c9dacb8f..a7d26780f 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc @@ -51,23 +51,23 @@ cygheap_user::init () if (!OpenProcessToken (hMainProc, TOKEN_ADJUST_DEFAULT | TOKEN_QUERY, &ptok)) { - system_printf ("OpenProcessToken(): %E"); + system_printf ("OpenProcessToken(), %E"); return; } if (!GetTokenInformation (ptok, TokenPrimaryGroup, &groups.pgsid, sizeof (cygsid), &siz)) - system_printf ("GetTokenInformation (TokenPrimaryGroup): %E"); + system_printf ("GetTokenInformation (TokenPrimaryGroup), %E"); /* Get the SID from current process and store it in effec_cygsid */ if (!GetTokenInformation (ptok, TokenUser, &effec_cygsid, sizeof (cygsid), &siz)) { - system_printf ("GetTokenInformation (TokenUser): %E"); + system_printf ("GetTokenInformation (TokenUser), %E"); goto out; } /* Set token owner to the same value as token user */ if (!SetTokenInformation (ptok, TokenOwner, &effec_cygsid, sizeof (cygsid))) - debug_printf ("SetTokenInformation(TokenOwner): %E"); + debug_printf ("SetTokenInformation(TokenOwner), %E"); /* Standard way to build a security descriptor with the usual DACL */ char sa_buf[1024]; @@ -81,12 +81,12 @@ cygheap_user::init () { /* Set the default DACL and the process DACL */ if (!SetTokenInformation (ptok, TokenDefaultDacl, &dacl, sizeof (dacl))) - system_printf ("SetTokenInformation (TokenDefaultDacl): %E"); + system_printf ("SetTokenInformation (TokenDefaultDacl), %E"); if (!SetKernelObjectSecurity (hMainProc, DACL_SECURITY_INFORMATION, psd)) - system_printf ("SetKernelObjectSecurity: %E"); + system_printf ("SetKernelObjectSecurity, %E"); } else - system_printf("Cannot get dacl: %E"); + system_printf("Cannot get dacl, %E"); out: CloseHandle (ptok); } @@ -122,7 +122,7 @@ internal_getlogin (cygheap_user &user) /* Set primary group to the group in /etc/passwd. */ if (!SetTokenInformation (ptok, TokenPrimaryGroup, &gsid, sizeof gsid)) - debug_printf ("SetTokenInformation(TokenPrimaryGroup): %E"); + debug_printf ("SetTokenInformation(TokenPrimaryGroup), %E"); else user.groups.pgsid = gsid; CloseHandle (ptok); diff --git a/winsup/cygwin/wait.cc b/winsup/cygwin/wait.cc index 4fa53bac6..7d1f13a53 100644 --- a/winsup/cygwin/wait.cc +++ b/winsup/cygwin/wait.cc @@ -117,6 +117,6 @@ wait4 (int intpid, int *status, int options, struct rusage *r) intpid, status, w->status, options, res); w->status = -1; if (res < 0) - sigproc_printf ("*** errno = %d", get_errno ()); + sigproc_printf ("*** errno %d", get_errno ()); return res; }