[GRASS-SVN] r48044 - grass/branches/develbranch_6/lib/segment

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Sep 1 12:20:04 EDT 2011


Author: neteler
Date: 2011-09-01 09:20:04 -0700 (Thu, 01 Sep 2011)
New Revision: 48044

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

Modified: grass/branches/develbranch_6/lib/segment/format.c
===================================================================
--- grass/branches/develbranch_6/lib/segment/format.c	2011-09-01 16:19:57 UTC (rev 48043)
+++ grass/branches/develbranch_6/lib/segment/format.c	2011-09-01 16:20:04 UTC (rev 48044)
@@ -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