From 1db928422e2a2a3140f44f2c8dab9ae33cf751fb Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Sat, 8 Nov 2003 16:38:34 +0000 Subject: * syscalls.cc (ftruncate64): Log length as long long. (logout): Erase ut_host. Don't write wtmp entry. Return 1 only if matching utmp entry has been found, 0 otherwise. --- winsup/cygwin/syscalls.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'winsup/cygwin/syscalls.cc') diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 2bda5ddd7..dfc5f0f97 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -1829,7 +1829,7 @@ ftruncate64 (int fd, _off64_t length) } } - syscall_printf ("%d = ftruncate (%d, %d)", res, fd, length); + syscall_printf ("%d = ftruncate (%d, %D)", res, fd, length); return res; } @@ -2657,15 +2657,14 @@ logout (char *line) { ut->ut_type = DEAD_PROCESS; memset (ut->ut_user, 0, sizeof ut->ut_user); + memset (ut->ut_host, 0, sizeof ut->ut_host); time (&ut->ut_time); - updwtmp (_PATH_WTMP, &ut_buf); debug_printf ("set logout time for %s", line); - memset (ut->ut_line, 0, sizeof ut_buf.ut_line); - ut->ut_time = 0; pututline (ut); endutent (); + return 1; } - return 1; + return 0; } static int utmp_fd = -1; -- cgit v1.2.3