[GRASS-SVN] r64905 - grass/branches/releasebranch_7_0/lib/raster
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Mar 24 23:45:15 PDT 2015
Author: neteler
Date: 2015-03-24 23:45:15 -0700 (Tue, 24 Mar 2015)
New Revision: 64905
Modified:
grass/branches/releasebranch_7_0/lib/raster/put_row.c
Log:
libraster: use strerror(errno) (trunk, r64899)
Modified: grass/branches/releasebranch_7_0/lib/raster/put_row.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/raster/put_row.c 2015-03-25 03:43:24 UTC (rev 64904)
+++ grass/branches/releasebranch_7_0/lib/raster/put_row.c 2015-03-25 06:45:15 UTC (rev 64905)
@@ -21,6 +21,7 @@
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
+#include <errno.h>
#include <grass/config.h>
#include <grass/raster.h>
@@ -117,8 +118,8 @@
ssize_t nwrite = fcb->nbytes * n;
if (write(fcb->data_fd, buf, nwrite) != nwrite)
- G_fatal_error(_("Error writing uncompressed FP data for row %d of <%s>"),
- row, fcb->name);
+ G_fatal_error(_("Error writing uncompressed FP data for row %d of <%s>: %s"),
+ row, fcb->name, strerror(errno));
}
static void write_data_compressed(int fd, int row, unsigned char *buf, int n)
@@ -127,8 +128,8 @@
int nwrite = fcb->nbytes * n;
if (G_zlib_write(fcb->data_fd, buf, nwrite) < 0)
- G_fatal_error(_("Error writing compressed FP data for row %d of <%s>"),
- row, fcb->name);
+ G_fatal_error(_("Error writing compressed FP data for row %d of <%s>: %s"),
+ row, fcb->name, strerror(errno));
}
static void set_file_pointer(int fd, int row)
More information about the grass-commit
mailing list