mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
fix some error messages: err() instead of errx(strerror())
This commit is contained in:
@@ -615,8 +615,7 @@ main(int argc, char *argv[])
|
||||
}
|
||||
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);
|
||||
|
||||
@@ -85,8 +85,8 @@ main(int argc, char *argv[])
|
||||
("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");
|
||||
|
||||
|
||||
@@ -22,8 +22,7 @@ SetMapfileName(char *name)
|
||||
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 @@ SetSymfileName(char *name)
|
||||
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");
|
||||
}
|
||||
|
||||
@@ -446,8 +446,8 @@ obj_Readfile(char *tzObjectfile)
|
||||
|
||||
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 @@ lib_Readfile(char *tzLibfile)
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user