diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2017-11-08 13:30:42 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2017-11-08 13:30:42 +0100 |
commit | c983aa48798dc7adc165862de4b89a6e49b97bdd (patch) | |
tree | 23ee4021884da17e13df55e624de4e380b122106 | |
parent | 46702f92ea499d15cb43c7c46ff9ad05f26aec6d (diff) | |
download | cygnal-c983aa48798dc7adc165862de4b89a6e49b97bdd.tar.gz cygnal-c983aa48798dc7adc165862de4b89a6e49b97bdd.tar.bz2 cygnal-c983aa48798dc7adc165862de4b89a6e49b97bdd.zip |
cygwin: fhandler_disk_file::pread: always print debug info on return
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r-- | winsup/cygwin/fhandler_disk_file.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index 2e4cf4936..0b99c490e 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -1541,14 +1541,20 @@ fhandler_disk_file::pread (void *buf, size_t count, off_t offset) if (status == (NTSTATUS) STATUS_ACCESS_VIOLATION) { if (is_at_eof (prw_handle)) - return 0; + { + res = 0; + goto out; + } switch (mmap_is_attached_or_noreserve (buf, count)) { case MMAP_NORESERVE_COMMITED: status = NtReadFile (prw_handle, NULL, NULL, NULL, &io, buf, count, &off, NULL); if (NT_SUCCESS (status)) - return io.Information; + { + res = io.Information; + goto out; + } break; case MMAP_RAISE_SIGBUS: raise (SIGBUS); @@ -1579,6 +1585,7 @@ non_atomic: res = -1; } } +out: debug_printf ("%d = pread(%p, %ld, %D)\n", res, buf, count, offset); return res; } |