shithub: rgbds

Download patch

ref: 7293da9084274df88db06f7c321e02333c6ca9fa
parent: 3a95de144e826b4a030f095c2dce719ba2ba959d
author: bentley <[email protected]>
date: Wed Feb 17 13:28:03 EST 2010

fix some error messages: err() instead of errx(strerror())

--- a/src/fix/main.c
+++ b/src/fix/main.c
@@ -615,8 +615,7 @@
 		}
 		fclose(f);
 	} else {
-		errx(EX_NOINPUT, "Could not open file '%s' : %s", filename,
-		    strerror(errno));
+		err(EX_NOINPUT, "Could not open file '%s'", filename);
 	}
 
 	return (0);
--- a/src/lib/main.c
+++ b/src/lib/main.c
@@ -85,8 +85,8 @@
 						    ("Extracted module '%s'\n",
 						    argv[argn]);
 					} else
-						errx(EX_NOINPUT,
-						    "Unable to write module '%s' : %s", argv[argn], strerror(errno));
+						err(EX_NOINPUT,
+						    "Unable to write module '%s'", argv[argn]);
 				} else
 					errx(EX_NOINPUT, "Module not found");
 
--- a/src/link/mapfile.c
+++ b/src/link/mapfile.c
@@ -22,8 +22,7 @@
 	mf = fopen(name, "w");
 
 	if (mf == NULL)
-		errx(EX_CANTCREAT, "Cannot open mapfile '%s' : %s", name,
-		    strerror(errno));
+		err(EX_CANTCREAT, "Cannot open mapfile '%s'", name);
 }
 
 void 
@@ -32,8 +31,7 @@
 	sf = fopen(name, "w");
 
 	if (sf == NULL)
-		errx(EX_CANTCREAT, "Cannot open symfile '%s' : %s", name,
-		    strerror(errno));
+		errx(EX_CANTCREAT, "Cannot open symfile '%s'", name);
 
 	fprintf(sf, ";File generated by xLink v" LINK_VERSION "\n\n");
 }
--- a/src/link/object.c
+++ b/src/link/object.c
@@ -446,8 +446,8 @@
 
 	pObjfile = fopen(tzObjectfile, "rb");
 	if (pObjfile == NULL)
-		errx(EX_NOINPUT, "Unable to open object '%s' : %s",
-		    tzObjectfile, strerror(errno));
+		err(EX_NOINPUT, "Unable to open object '%s'",
+		    tzObjectfile);
 	obj_ReadOpenFile(pObjfile, tzObjectfile);
 	fclose(pObjfile);
 
@@ -496,8 +496,7 @@
 
 	pObjfile = fopen(tzLibfile, "rb");
 	if (pObjfile == NULL)
-		errx(EX_NOINPUT, "Unable to open object '%s' : %s",
-		    tzLibfile, strerror(errno));
+		err(EX_NOINPUT, "Unable to open object '%s'", tzLibfile);
 	if (!pObjfile) {
 		errx(5, "Unable to open '%s'", tzLibfile);
 	}