[GRASS-SVN] r48043 - grass/branches/releasebranch_6_4/lib/segment

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Sep 1 12:19:57 EDT 2011


Author: neteler
Date: 2011-09-01 09:19:57 -0700 (Thu, 01 Sep 2011)
New Revision: 48043

Modified:
   grass/branches/releasebranch_6_4/lib/segment/format.c
Log:
warnings prettified

Modified: grass/branches/releasebranch_6_4/lib/segment/format.c
===================================================================
--- grass/branches/releasebranch_6_4/lib/segment/format.c	2011-09-01 16:17:36 UTC (rev 48042)
+++ grass/branches/releasebranch_6_4/lib/segment/format.c	2011-09-01 16:19:57 UTC (rev 48043)
@@ -120,7 +120,7 @@
     }
 
     if (lseek(fd, 0L, SEEK_SET) == (off_t) -1) {
-	G_warning("Segment_format: %s", strerror(errno));
+	G_warning("segment_format(): Unable to seek (%s)", strerror(errno));
 	return -1;
     }
 
@@ -158,7 +158,7 @@
 static int write_int(int fd, int n)
 {
     if (write(fd, &n, sizeof(int)) != sizeof(int)) {
-	G_warning("%s", strerror(errno));
+	G_warning("segment_format(): Unable to write (%s)", strerror(errno));
 	return 0;
     }
 
@@ -182,7 +182,7 @@
     while (nbytes > 0) {
 	n = nbytes > sizeof(buf) ? sizeof(buf) : nbytes;
 	if (write(fd, buf, n) != n) {
-	    G_warning("%s", strerror(errno));
+	    G_warning("segment zero_fill(): Unable to write (%s)", strerror(errno));
 	    return -1;
 	}
 	nbytes -= n;
@@ -200,11 +200,11 @@
 
     G_debug(3, "Using new segmentation code...");
     if (lseek(fd, nbytes - 1, SEEK_CUR) < 0) {
-	G_warning("%s", strerror(errno));
+	G_warning("segment zero_fill(): Unable to seek (%s)", strerror(errno));
 	return -1;
     }
     if (write(fd, buf, 1) != 1) {
-	G_warning("%s", strerror(errno));
+	G_warning("segment zero_fill(): Unable to write (%s)", strerror(errno));
 	return -1;
     }
 



More information about the grass-commit mailing list