diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2004-04-21 12:16:13 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2004-04-21 12:16:13 +0400 |
commit | b7ede86cfec578cd698cfdbb367845f7e8ed7a25 (patch) | |
tree | 14b3449910e816cdb435335d82b5554d8ab9ccd9 /winsup | |
parent | c55888059d295f5bb20f4d25090c7aee67ba709e (diff) |
* syscalls.cc (lseek64): Fix debug_printf format string.
(truncate64): Ditto.
* fhandler.cc (fhandler_base::lseek): Force res to -1 on error.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 9 | ||||
-rw-r--r-- | winsup/cygwin/fhandler.cc | 1 | ||||
-rw-r--r-- | winsup/cygwin/syscalls.cc | 4 |
3 files changed, 12 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index e94671883..1417814d7 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,12 @@ +2004-04-21 Yitzchak Scott-Thoennes <sthoenna@efn.org> + + * syscalls.cc (lseek64): Fix debug_printf format string. + (truncate64): Ditto. + +2004-04-21 Corinna Vinschen <corinna@vinschen.de> + + * fhandler.cc (fhandler_base::lseek): Force res to -1 on error. + 2004-04-20 Christopher Faylor <cgf@alum.bu.edu> * path.cc (is_unc_share): Rename from slash_unc_prefix_p throughout. diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index 1d9f42c9c..445146aa9 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -1090,6 +1090,7 @@ fhandler_base::lseek (_off64_t offset, int whence) if (res == INVALID_SET_FILE_POINTER && GetLastError ()) { __seterrno (); + res = -1; } else { diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 521906590..c8f02e0d6 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -603,7 +603,7 @@ lseek64 (int fd, _off64_t pos, int dir) else res = -1; } - syscall_printf ("%d = lseek (%d, %D, %d)", res, fd, pos, dir); + syscall_printf ("%D = lseek (%d, %D, %d)", res, fd, pos, dir); return res; } @@ -1709,7 +1709,7 @@ truncate64 (const char *pathname, _off64_t length) res = ftruncate64 (fd, length); close (fd); } - syscall_printf ("%d = truncate (%s, %d)", res, pathname, length); + syscall_printf ("%d = truncate (%s, %D)", res, pathname, length); return res; } |