Remove \n from calls to strace class printfs throughout.
This commit is contained in:
parent
da77b2c84c
commit
f70389b541
|
@ -1,3 +1,7 @@
|
||||||
|
2002-09-30 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
Remove \n from calls to strace class printfs throughout.
|
||||||
|
|
||||||
2002-09-30 Christopher Faylor <cgf@redhat.com>
|
2002-09-30 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
* exceptions.cc (unused_sig_wrapper): Accommodate newer compilers.
|
* exceptions.cc (unused_sig_wrapper): Accommodate newer compilers.
|
||||||
|
|
|
@ -333,7 +333,7 @@ globify (char *word, char **&argv, int &argc, int &argvlen)
|
||||||
char **av = argv + n;
|
char **av = argv + n;
|
||||||
while (*gv)
|
while (*gv)
|
||||||
{
|
{
|
||||||
debug_printf ("argv[%d] = '%s'\n", n++, *gv);
|
debug_printf ("argv[%d] = '%s'", n++, *gv);
|
||||||
*av++ = *gv++;
|
*av++ = *gv++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -403,7 +403,7 @@ build_argv (char *cmd, char **&argv, int &argc, int winshell)
|
||||||
/* Add word to argv file after (optional) wildcard expansion. */
|
/* Add word to argv file after (optional) wildcard expansion. */
|
||||||
if (!winshell || !argc || !globify (word, argv, argc, argvlen))
|
if (!winshell || !argc || !globify (word, argv, argc, argvlen))
|
||||||
{
|
{
|
||||||
debug_printf ("argv[%d] = '%s'\n", argc, word);
|
debug_printf ("argv[%d] = '%s'", argc, word);
|
||||||
argv[argc++] = word;
|
argv[argc++] = word;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -793,7 +793,7 @@ initial_env ()
|
||||||
DWORD ms = atoi (buf);
|
DWORD ms = atoi (buf);
|
||||||
buf[0] = '\0';
|
buf[0] = '\0';
|
||||||
len = GetModuleFileName (NULL, buf, MAX_PATH);
|
len = GetModuleFileName (NULL, buf, MAX_PATH);
|
||||||
console_printf ("Sleeping %d, pid %u %s\n", ms, GetCurrentProcessId (), buf);
|
console_printf ("Sleeping %d, pid %u %s", ms, GetCurrentProcessId (), buf);
|
||||||
Sleep (ms);
|
Sleep (ms);
|
||||||
}
|
}
|
||||||
if (GetEnvironmentVariable ("CYGWIN_DEBUG", buf, sizeof (buf) - 1))
|
if (GetEnvironmentVariable ("CYGWIN_DEBUG", buf, sizeof (buf) - 1))
|
||||||
|
|
|
@ -188,7 +188,7 @@ dll_list::detach (dll *d)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (d->count <= 0)
|
if (d->count <= 0)
|
||||||
system_printf ("WARNING: try to detach an already detached dll ...\n");
|
system_printf ("WARNING: try to detach an already detached dll ...");
|
||||||
else if (--d->count == 0)
|
else if (--d->count == 0)
|
||||||
{
|
{
|
||||||
d->p.run_dtors ();
|
d->p.run_dtors ();
|
||||||
|
|
|
@ -765,7 +765,7 @@ interrupt_on_return (sigthread *th, int sig, void *handler, struct sigaction& si
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
sigproc_printf ("couldn't find a stack frame, i %d\n", i);
|
sigproc_printf ("couldn't find a stack frame, i %d", i);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ set_clipboard (const void *buf, size_t len)
|
||||||
hmem = GlobalAlloc (GMEM_MOVEABLE, len + sizeof (size_t));
|
hmem = GlobalAlloc (GMEM_MOVEABLE, len + sizeof (size_t));
|
||||||
if (!hmem)
|
if (!hmem)
|
||||||
{
|
{
|
||||||
system_printf ("Couldn't allocate global buffer for write\n");
|
system_printf ("Couldn't allocate global buffer for write");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
clipbuf = (unsigned char *) GlobalLock (hmem);
|
clipbuf = (unsigned char *) GlobalLock (hmem);
|
||||||
|
@ -101,7 +101,7 @@ set_clipboard (const void *buf, size_t len)
|
||||||
if (!SetClipboardData (cygnativeformat, hmem))
|
if (!SetClipboardData (cygnativeformat, hmem))
|
||||||
{
|
{
|
||||||
system_printf
|
system_printf
|
||||||
("Couldn't write native format to the clipboard %04x %x\n",
|
("Couldn't write native format to the clipboard %04x %x",
|
||||||
cygnativeformat, hmem);
|
cygnativeformat, hmem);
|
||||||
/* FIXME: return an appriate error code &| set_errno(); */
|
/* FIXME: return an appriate error code &| set_errno(); */
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -110,7 +110,7 @@ set_clipboard (const void *buf, size_t len)
|
||||||
if (GlobalFree (hmem))
|
if (GlobalFree (hmem))
|
||||||
{
|
{
|
||||||
system_printf
|
system_printf
|
||||||
("Couldn't free global buffer after write to the clipboard\n");
|
("Couldn't free global buffer after write to the clipboard");
|
||||||
/* FIXME: return an appriate error code &| set_errno(); */
|
/* FIXME: return an appriate error code &| set_errno(); */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,7 @@ set_clipboard (const void *buf, size_t len)
|
||||||
hmem = GlobalAlloc (GMEM_MOVEABLE, len + 2);
|
hmem = GlobalAlloc (GMEM_MOVEABLE, len + 2);
|
||||||
if (!hmem)
|
if (!hmem)
|
||||||
{
|
{
|
||||||
system_printf ("Couldn't allocate global buffer for write\n");
|
system_printf ("Couldn't allocate global buffer for write");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
clipbuf = (unsigned char *) GlobalLock (hmem);
|
clipbuf = (unsigned char *) GlobalLock (hmem);
|
||||||
|
@ -132,7 +132,7 @@ set_clipboard (const void *buf, size_t len)
|
||||||
if (!SetClipboardData
|
if (!SetClipboardData
|
||||||
((current_codepage == ansi_cp ? CF_TEXT : CF_OEMTEXT), hmem))
|
((current_codepage == ansi_cp ? CF_TEXT : CF_OEMTEXT), hmem))
|
||||||
{
|
{
|
||||||
system_printf ("Couldn't write to the clipboard\n");
|
system_printf ("Couldn't write to the clipboard");
|
||||||
/* FIXME: return an appriate error code &| set_errno(); */
|
/* FIXME: return an appriate error code &| set_errno(); */
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,7 @@ set_clipboard (const void *buf, size_t len)
|
||||||
if (GlobalFree (hmem))
|
if (GlobalFree (hmem))
|
||||||
{
|
{
|
||||||
system_printf
|
system_printf
|
||||||
("Couldn't free global buffer after write to the clipboard\n");
|
("Couldn't free global buffer after write to the clipboard");
|
||||||
/* FIXME: return an appriate error code &| set_errno(); */
|
/* FIXME: return an appriate error code &| set_errno(); */
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -157,7 +157,7 @@ fhandler_dev_clipboard::write (const void *buf, size_t len)
|
||||||
void *tempbuffer = realloc (membuffer, cursize + len);
|
void *tempbuffer = realloc (membuffer, cursize + len);
|
||||||
if (!tempbuffer)
|
if (!tempbuffer)
|
||||||
{
|
{
|
||||||
system_printf ("Couldn't realloc() clipboard buffer for write\n");
|
system_printf ("Couldn't realloc() clipboard buffer for write");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
membuffer = tempbuffer;
|
membuffer = tempbuffer;
|
||||||
|
@ -235,7 +235,7 @@ fhandler_dev_clipboard::read (void *ptr, size_t len)
|
||||||
{
|
{
|
||||||
CloseClipboard ();
|
CloseClipboard ();
|
||||||
#if 0
|
#if 0
|
||||||
system_printf ("a non-accepted format! %d\n", format);
|
system_printf ("a non-accepted format! %d", format);
|
||||||
#endif
|
#endif
|
||||||
set_errno (0);
|
set_errno (0);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -93,12 +93,12 @@ Audio::open (int rate, int bits, int channels, bool bCallback)
|
||||||
nBytesWritten_ = 0L;
|
nBytesWritten_ = 0L;
|
||||||
bufferIndex_ = 0;
|
bufferIndex_ = 0;
|
||||||
buffer_ = 0L;
|
buffer_ = 0L;
|
||||||
debug_printf ("number devices %d\n", nDevices);
|
debug_printf ("number devices %d", nDevices);
|
||||||
if (nDevices <= 0)
|
if (nDevices <= 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
debug_printf ("trying to map device freq %d, bits %d, "
|
debug_printf ("trying to map device freq %d, bits %d, "
|
||||||
"channels %d, callback %d\n", rate, bits, channels,
|
"channels %d, callback %d", rate, bits, channels,
|
||||||
bCallback);
|
bCallback);
|
||||||
|
|
||||||
int bytesperSample = bits / 8;
|
int bytesperSample = bits / 8;
|
||||||
|
@ -519,7 +519,7 @@ fhandler_dev_dsp::ioctl (unsigned int cmd, void *ptr)
|
||||||
int *intptr = (int *) ptr;
|
int *intptr = (int *) ptr;
|
||||||
switch (cmd)
|
switch (cmd)
|
||||||
{
|
{
|
||||||
#define CASE(a) case a : debug_printf("/dev/dsp: ioctl %s\n", #a);
|
#define CASE(a) case a : debug_printf("/dev/dsp: ioctl %s", #a);
|
||||||
|
|
||||||
CASE (SNDCTL_DSP_RESET)
|
CASE (SNDCTL_DSP_RESET)
|
||||||
audioformat_ = AFMT_S8;
|
audioformat_ = AFMT_S8;
|
||||||
|
@ -624,7 +624,7 @@ fhandler_dev_dsp::ioctl (unsigned int cmd, void *ptr)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
debug_printf ("/dev/dsp: ioctl not handled yet! FIXME:\n");
|
debug_printf ("/dev/dsp: ioctl not handled yet! FIXME:");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#undef CASE
|
#undef CASE
|
||||||
|
|
|
@ -765,7 +765,7 @@ fhandler_serial::tcsetattr (int action, const struct termios *t)
|
||||||
vmin_ = t->c_cc[VMIN];
|
vmin_ = t->c_cc[VMIN];
|
||||||
}
|
}
|
||||||
|
|
||||||
debug_printf ("vtime %d, vmin %d\n", vtime_, vmin_);
|
debug_printf ("vtime %d, vmin %d", vtime_, vmin_);
|
||||||
|
|
||||||
if (ovmin == vmin_ && ovtime == vtime_)
|
if (ovmin == vmin_ && ovtime == vtime_)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -1104,7 +1104,7 @@ fhandler_socket::ioctl (unsigned int cmd, void *p)
|
||||||
}
|
}
|
||||||
res = get_ifconf (ifcp, cmd);
|
res = get_ifconf (ifcp, cmd);
|
||||||
if (res)
|
if (res)
|
||||||
debug_printf ("error in get_ifconf\n");
|
debug_printf ("error in get_ifconf");
|
||||||
break;
|
break;
|
||||||
case SIOCGIFFLAGS:
|
case SIOCGIFFLAGS:
|
||||||
ifr = (struct ifreq *) p;
|
ifr = (struct ifreq *) p;
|
||||||
|
@ -1134,7 +1134,7 @@ fhandler_socket::ioctl (unsigned int cmd, void *p)
|
||||||
ifr = (struct ifreq *) p;
|
ifr = (struct ifreq *) p;
|
||||||
if (ifr == 0)
|
if (ifr == 0)
|
||||||
{
|
{
|
||||||
debug_printf ("ifr == NULL\n");
|
debug_printf ("ifr == NULL");
|
||||||
set_errno (EINVAL);
|
set_errno (EINVAL);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -1142,16 +1142,16 @@ fhandler_socket::ioctl (unsigned int cmd, void *p)
|
||||||
res = get_ifconf (&ifc, cmd);
|
res = get_ifconf (&ifc, cmd);
|
||||||
if (res)
|
if (res)
|
||||||
{
|
{
|
||||||
debug_printf ("error in get_ifconf\n");
|
debug_printf ("error in get_ifconf");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
debug_printf (" name: %s\n", ifr->ifr_name);
|
debug_printf (" name: %s", ifr->ifr_name);
|
||||||
for (ifrp = ifc.ifc_req;
|
for (ifrp = ifc.ifc_req;
|
||||||
(caddr_t) ifrp < ifc.ifc_buf + ifc.ifc_len;
|
(caddr_t) ifrp < ifc.ifc_buf + ifc.ifc_len;
|
||||||
++ifrp)
|
++ifrp)
|
||||||
{
|
{
|
||||||
debug_printf ("testname: %s\n", ifrp->ifr_name);
|
debug_printf ("testname: %s", ifrp->ifr_name);
|
||||||
if (! strcmp (ifrp->ifr_name, ifr->ifr_name))
|
if (! strcmp (ifrp->ifr_name, ifr->ifr_name))
|
||||||
{
|
{
|
||||||
switch (cmd)
|
switch (cmd)
|
||||||
|
|
|
@ -119,7 +119,7 @@ fhandler_dev_tape::close (void)
|
||||||
if ((has_written) && (! eom_detected))
|
if ((has_written) && (! eom_detected))
|
||||||
{
|
{
|
||||||
/* if last operation was writing, write a filemark */
|
/* if last operation was writing, write a filemark */
|
||||||
debug_printf ("writing filemark\n");
|
debug_printf ("writing filemark");
|
||||||
op.mt_op = MTWEOF;
|
op.mt_op = MTWEOF;
|
||||||
op.mt_count = 1;
|
op.mt_count = 1;
|
||||||
ioctl (MTIOCTOP, &op);
|
ioctl (MTIOCTOP, &op);
|
||||||
|
@ -131,7 +131,7 @@ fhandler_dev_tape::close (void)
|
||||||
|
|
||||||
if (is_rewind_device ())
|
if (is_rewind_device ())
|
||||||
{
|
{
|
||||||
debug_printf ("rewinding\n");
|
debug_printf ("rewinding");
|
||||||
op.mt_op = MTREW;
|
op.mt_op = MTREW;
|
||||||
ioctl (MTIOCTOP, &op);
|
ioctl (MTIOCTOP, &op);
|
||||||
}
|
}
|
||||||
|
@ -167,7 +167,7 @@ fhandler_dev_tape::lseek (__off64_t offset, int whence)
|
||||||
struct mtop op;
|
struct mtop op;
|
||||||
struct mtpos pos;
|
struct mtpos pos;
|
||||||
|
|
||||||
debug_printf ("lseek (%s, %d, %d)\n", get_name (), offset, whence);
|
debug_printf ("lseek (%s, %d, %d)", get_name (), offset, whence);
|
||||||
|
|
||||||
writebuf ();
|
writebuf ();
|
||||||
eom_detected = eof_detected = 0;
|
eom_detected = eof_detected = 0;
|
||||||
|
@ -444,7 +444,7 @@ static int
|
||||||
tape_error (DWORD lasterr, const char *txt)
|
tape_error (DWORD lasterr, const char *txt)
|
||||||
{
|
{
|
||||||
if (lasterr)
|
if (lasterr)
|
||||||
debug_printf ("%s: error: %d\n", txt, lasterr);
|
debug_printf ("%s: error: %d", txt, lasterr);
|
||||||
|
|
||||||
return lasterr;
|
return lasterr;
|
||||||
}
|
}
|
||||||
|
@ -452,7 +452,7 @@ tape_error (DWORD lasterr, const char *txt)
|
||||||
int
|
int
|
||||||
fhandler_dev_tape::tape_write_marks (int marktype, DWORD len)
|
fhandler_dev_tape::tape_write_marks (int marktype, DWORD len)
|
||||||
{
|
{
|
||||||
syscall_printf ("write_tapemark\n");
|
syscall_printf ("write_tapemark");
|
||||||
while (((lasterr = WriteTapemark (get_handle (),
|
while (((lasterr = WriteTapemark (get_handle (),
|
||||||
marktype,
|
marktype,
|
||||||
len,
|
len,
|
||||||
|
|
|
@ -245,7 +245,7 @@ fork_child (HANDLE& hParent, dll *&first_dll, bool& load_dlls)
|
||||||
}
|
}
|
||||||
|
|
||||||
sync_with_parent ("after longjmp.", TRUE);
|
sync_with_parent ("after longjmp.", TRUE);
|
||||||
sigproc_printf ("hParent %p, child 1 first_dll %p, load_dlls %d\n", hParent,
|
sigproc_printf ("hParent %p, child 1 first_dll %p, load_dlls %d", hParent,
|
||||||
first_dll, load_dlls);
|
first_dll, load_dlls);
|
||||||
|
|
||||||
#ifdef DEBUGGING
|
#ifdef DEBUGGING
|
||||||
|
|
|
@ -38,7 +38,7 @@ ioctl (int fd, int cmd, ...)
|
||||||
char *argp = va_arg (ap, char *);
|
char *argp = va_arg (ap, char *);
|
||||||
va_end (ap);
|
va_end (ap);
|
||||||
|
|
||||||
debug_printf ("fd %d, cmd %x\n", fd, cmd);
|
debug_printf ("fd %d, cmd %x", fd, cmd);
|
||||||
if (cfd->is_tty () && cfd->get_device () != FH_PTYM)
|
if (cfd->is_tty () && cfd->get_device () != FH_PTYM)
|
||||||
switch (cmd)
|
switch (cmd)
|
||||||
{
|
{
|
||||||
|
|
|
@ -879,7 +879,7 @@ cygwin_gethostname (char *name, size_t len)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
debug_printf ("name %s\n", name);
|
debug_printf ("name %s", name);
|
||||||
h_errno = 0;
|
h_errno = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1810,7 +1810,7 @@ mount_info::read_mounts (reg_key& r)
|
||||||
break;
|
break;
|
||||||
else if (res != ERROR_SUCCESS)
|
else if (res != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
debug_printf ("RegEnumKeyEx failed, error %d!\n", res);
|
debug_printf ("RegEnumKeyEx failed, error %d!", res);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -754,11 +754,11 @@ verify_token (HANDLE token, cygsid &usersid, user_groups &groups, BOOL *pintern)
|
||||||
|
|
||||||
if (!GetTokenInformation (token, TokenGroups, NULL, 0, &size) &&
|
if (!GetTokenInformation (token, TokenGroups, NULL, 0, &size) &&
|
||||||
GetLastError () != ERROR_INSUFFICIENT_BUFFER)
|
GetLastError () != ERROR_INSUFFICIENT_BUFFER)
|
||||||
debug_printf ("GetTokenInformation(token, TokenGroups): %E\n");
|
debug_printf ("GetTokenInformation(token, TokenGroups): %E");
|
||||||
else if (!(my_grps = (PTOKEN_GROUPS) malloc (size)))
|
else if (!(my_grps = (PTOKEN_GROUPS) malloc (size)))
|
||||||
debug_printf ("malloc (my_grps) failed.");
|
debug_printf ("malloc (my_grps) failed.");
|
||||||
else if (!GetTokenInformation (token, TokenGroups, my_grps, size, &size))
|
else if (!GetTokenInformation (token, TokenGroups, my_grps, size, &size))
|
||||||
debug_printf ("GetTokenInformation(my_token, TokenGroups): %E\n");
|
debug_printf ("GetTokenInformation(my_token, TokenGroups): %E");
|
||||||
else if (!groups.issetgroups ()) /* setgroups was never called */
|
else if (!groups.issetgroups ()) /* setgroups was never called */
|
||||||
{
|
{
|
||||||
ret = sid_in_token_groups (my_grps, groups.pgsid);
|
ret = sid_in_token_groups (my_grps, groups.pgsid);
|
||||||
|
@ -855,7 +855,7 @@ create_token (cygsid &usersid, user_groups &new_groups, struct passwd *pw)
|
||||||
|
|
||||||
/* Retrieve authentication id and group list from own process. */
|
/* Retrieve authentication id and group list from own process. */
|
||||||
if (!OpenProcessToken (hMainProc, TOKEN_QUERY, &my_token))
|
if (!OpenProcessToken (hMainProc, TOKEN_QUERY, &my_token))
|
||||||
debug_printf ("OpenProcessToken(my_token): %E\n");
|
debug_printf ("OpenProcessToken(my_token): %E");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Switching user context to SYSTEM doesn't inherit the authentication
|
/* Switching user context to SYSTEM doesn't inherit the authentication
|
||||||
|
@ -864,7 +864,7 @@ create_token (cygsid &usersid, user_groups &new_groups, struct passwd *pw)
|
||||||
if (!GetTokenInformation (my_token, TokenStatistics,
|
if (!GetTokenInformation (my_token, TokenStatistics,
|
||||||
&stats, sizeof stats, &size))
|
&stats, sizeof stats, &size))
|
||||||
debug_printf
|
debug_printf
|
||||||
("GetTokenInformation(my_token, TokenStatistics): %E\n");
|
("GetTokenInformation(my_token, TokenStatistics): %E");
|
||||||
else
|
else
|
||||||
auth_luid = stats.AuthenticationId;
|
auth_luid = stats.AuthenticationId;
|
||||||
|
|
||||||
|
@ -872,13 +872,13 @@ create_token (cygsid &usersid, user_groups &new_groups, struct passwd *pw)
|
||||||
some important well known group sids. */
|
some important well known group sids. */
|
||||||
if (!GetTokenInformation (my_token, TokenGroups, NULL, 0, &size) &&
|
if (!GetTokenInformation (my_token, TokenGroups, NULL, 0, &size) &&
|
||||||
GetLastError () != ERROR_INSUFFICIENT_BUFFER)
|
GetLastError () != ERROR_INSUFFICIENT_BUFFER)
|
||||||
debug_printf ("GetTokenInformation(my_token, TokenGroups): %E\n");
|
debug_printf ("GetTokenInformation(my_token, TokenGroups): %E");
|
||||||
else if (!(my_tok_gsids = (PTOKEN_GROUPS) malloc (size)))
|
else if (!(my_tok_gsids = (PTOKEN_GROUPS) malloc (size)))
|
||||||
debug_printf ("malloc (my_tok_gsids) failed.");
|
debug_printf ("malloc (my_tok_gsids) failed.");
|
||||||
else if (!GetTokenInformation (my_token, TokenGroups, my_tok_gsids,
|
else if (!GetTokenInformation (my_token, TokenGroups, my_tok_gsids,
|
||||||
size, &size))
|
size, &size))
|
||||||
{
|
{
|
||||||
debug_printf ("GetTokenInformation(my_token, TokenGroups): %E\n");
|
debug_printf ("GetTokenInformation(my_token, TokenGroups): %E");
|
||||||
free (my_tok_gsids);
|
free (my_tok_gsids);
|
||||||
my_tok_gsids = NULL;
|
my_tok_gsids = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -379,7 +379,7 @@ readv (int fd, const struct iovec *const iov, const int iovcnt)
|
||||||
fd, iov, iovcnt, wait ? "" : "non", sigcatchers);
|
fd, iov, iovcnt, wait ? "" : "non", sigcatchers);
|
||||||
|
|
||||||
if (wait && (!cfd->is_slow () || cfd->get_r_no_interrupt ()))
|
if (wait && (!cfd->is_slow () || cfd->get_r_no_interrupt ()))
|
||||||
debug_printf ("no need to call ready_for_read\n");
|
debug_printf ("no need to call ready_for_read");
|
||||||
else if (!cfd->ready_for_read (fd, wait))
|
else if (!cfd->ready_for_read (fd, wait))
|
||||||
{
|
{
|
||||||
res = -1;
|
res = -1;
|
||||||
|
@ -1576,33 +1576,33 @@ ctermid (char *str)
|
||||||
extern "C" int
|
extern "C" int
|
||||||
_cygwin_istext_for_stdio (int fd)
|
_cygwin_istext_for_stdio (int fd)
|
||||||
{
|
{
|
||||||
syscall_printf ("_cygwin_istext_for_stdio (%d)\n", fd);
|
syscall_printf ("_cygwin_istext_for_stdio (%d)", fd);
|
||||||
if (CYGWIN_VERSION_OLD_STDIO_CRLF_HANDLING)
|
if (CYGWIN_VERSION_OLD_STDIO_CRLF_HANDLING)
|
||||||
{
|
{
|
||||||
syscall_printf (" _cifs: old API\n");
|
syscall_printf (" _cifs: old API");
|
||||||
return 0; /* we do it for old apps, due to getc/putc macros */
|
return 0; /* we do it for old apps, due to getc/putc macros */
|
||||||
}
|
}
|
||||||
|
|
||||||
cygheap_fdget cfd (fd, false, false);
|
cygheap_fdget cfd (fd, false, false);
|
||||||
if (cfd < 0)
|
if (cfd < 0)
|
||||||
{
|
{
|
||||||
syscall_printf (" _cifs: fd not open\n");
|
syscall_printf (" _cifs: fd not open");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cfd->get_device () != FH_DISK)
|
if (cfd->get_device () != FH_DISK)
|
||||||
{
|
{
|
||||||
syscall_printf (" _cifs: fd not disk file\n");
|
syscall_printf (" _cifs: fd not disk file");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cfd->get_w_binary () || cfd->get_r_binary ())
|
if (cfd->get_w_binary () || cfd->get_r_binary ())
|
||||||
{
|
{
|
||||||
syscall_printf (" _cifs: get_*_binary\n");
|
syscall_printf (" _cifs: get_*_binary");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
syscall_printf ("_cygwin_istext_for_stdio says yes\n");
|
syscall_printf ("_cygwin_istext_for_stdio says yes");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1617,7 +1617,7 @@ setmode_helper (FILE *f)
|
||||||
{
|
{
|
||||||
if (fileno (f) != setmode_file)
|
if (fileno (f) != setmode_file)
|
||||||
return 0;
|
return 0;
|
||||||
syscall_printf ("setmode: file was %s now %s\n",
|
syscall_printf ("setmode: file was %s now %s",
|
||||||
f->_flags & __SCLE ? "text" : "raw",
|
f->_flags & __SCLE ? "text" : "raw",
|
||||||
setmode_mode & O_TEXT ? "text" : "raw");
|
setmode_mode & O_TEXT ? "text" : "raw");
|
||||||
if (setmode_mode & O_TEXT)
|
if (setmode_mode & O_TEXT)
|
||||||
|
@ -1677,7 +1677,7 @@ setmode (int fd, int mode)
|
||||||
setmode_file = fd;
|
setmode_file = fd;
|
||||||
_fwalk (_REENT, setmode_helper);
|
_fwalk (_REENT, setmode_helper);
|
||||||
|
|
||||||
syscall_printf ("setmode (%d<%s>, %p) returns %s\n", fd, cfd->get_name (),
|
syscall_printf ("setmode (%d<%s>, %p) returns %s", fd, cfd->get_name (),
|
||||||
mode, res & O_TEXT ? "text" : "binary");
|
mode, res & O_TEXT ? "text" : "binary");
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
@ -2155,7 +2155,7 @@ setegid32 (__gid32_t gid)
|
||||||
RevertToSelf ();
|
RevertToSelf ();
|
||||||
}
|
}
|
||||||
if (!OpenProcessToken (hMainProc, TOKEN_ADJUST_DEFAULT, &ptok))
|
if (!OpenProcessToken (hMainProc, TOKEN_ADJUST_DEFAULT, &ptok))
|
||||||
debug_printf ("OpenProcessToken(): %E\n");
|
debug_printf ("OpenProcessToken(): %E");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!SetTokenInformation (ptok, TokenPrimaryGroup,
|
if (!SetTokenInformation (ptok, TokenPrimaryGroup,
|
||||||
|
|
|
@ -40,7 +40,7 @@ __to_clock_t (FILETIME * src, int flag)
|
||||||
total -= FACTOR;
|
total -= FACTOR;
|
||||||
|
|
||||||
total /= (unsigned long long) (NSPERSEC / CLOCKS_PER_SEC);
|
total /= (unsigned long long) (NSPERSEC / CLOCKS_PER_SEC);
|
||||||
syscall_printf ("total %08x %08x\n", (unsigned)(total>>32), (unsigned)(total));
|
syscall_printf ("total %08x %08x", (unsigned)(total>>32), (unsigned)(total));
|
||||||
return total;
|
return total;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ internal_getlogin (cygheap_user &user)
|
||||||
store it in user.psid */
|
store it in user.psid */
|
||||||
if (!OpenProcessToken (hMainProc, TOKEN_ADJUST_DEFAULT | TOKEN_QUERY,
|
if (!OpenProcessToken (hMainProc, TOKEN_ADJUST_DEFAULT | TOKEN_QUERY,
|
||||||
&ptok))
|
&ptok))
|
||||||
system_printf ("OpenProcessToken(): %E\n");
|
system_printf ("OpenProcessToken(): %E");
|
||||||
else if (!GetTokenInformation (ptok, TokenUser, &tu, sizeof tu, &siz))
|
else if (!GetTokenInformation (ptok, TokenUser, &tu, sizeof tu, &siz))
|
||||||
system_printf ("GetTokenInformation (TokenUser): %E");
|
system_printf ("GetTokenInformation (TokenUser): %E");
|
||||||
else if (!(ret = user.set_sid (tu)))
|
else if (!(ret = user.set_sid (tu)))
|
||||||
|
|
Loading…
Reference in New Issue