[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r35393 - gnunet/src/util
From: |
gnunet |
Subject: |
[GNUnet-SVN] r35393 - gnunet/src/util |
Date: |
Sun, 15 Mar 2015 18:30:28 +0100 |
Author: grothoff
Date: 2015-03-15 18:30:28 +0100 (Sun, 15 Mar 2015)
New Revision: 35393
Modified:
gnunet/src/util/disk.c
Log:
preserve errno
Modified: gnunet/src/util/disk.c
===================================================================
--- gnunet/src/util/disk.c 2015-03-15 12:12:35 UTC (rev 35392)
+++ gnunet/src/util/disk.c 2015-03-15 17:30:28 UTC (rev 35393)
@@ -868,7 +868,9 @@
{
if (GetLastError () != ERROR_IO_PENDING)
{
- LOG (GNUNET_ERROR_TYPE_DEBUG, "Error reading from pipe: %u\n",
GetLastError ());
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Error reading from pipe: %u\n",
+ GetLastError ());
SetErrnoFromWinError (GetLastError ());
return GNUNET_SYSERR;
}
@@ -983,6 +985,7 @@
{
struct GNUNET_DISK_FileHandle *fh;
ssize_t ret;
+ int eno;
fh = GNUNET_DISK_file_open (fn,
GNUNET_DISK_OPEN_READ,
@@ -990,8 +993,9 @@
if (NULL == fh)
return GNUNET_SYSERR;
ret = GNUNET_DISK_file_read (fh, result, len);
+ eno = errno;
GNUNET_assert (GNUNET_OK == GNUNET_DISK_file_close (fh));
-
+ errno = eno;
return ret;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r35393 - gnunet/src/util,
gnunet <=