Module Name: src
Committed By: christos
Date: Wed Jun 17 01:05:41 UTC 2015
Modified Files:
src/usr.sbin/makefs: cd9660.c
Log Message:
more error normalization
To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/usr.sbin/makefs/cd9660.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/makefs/cd9660.c
diff -u src/usr.sbin/makefs/cd9660.c:1.48 src/usr.sbin/makefs/cd9660.c:1.49
--- src/usr.sbin/makefs/cd9660.c:1.48 Tue Jun 16 19:04:14 2015
+++ src/usr.sbin/makefs/cd9660.c Tue Jun 16 21:05:41 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: cd9660.c,v 1.48 2015/06/16 23:04:14 christos Exp $ */
+/* $NetBSD: cd9660.c,v 1.49 2015/06/17 01:05:41 christos Exp $ */
/*
* Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan
@@ -103,7 +103,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: cd9660.c,v 1.48 2015/06/16 23:04:14 christos Exp $");
+__RCSID("$NetBSD: cd9660.c,v 1.49 2015/06/17 01:05:41 christos Exp $");
#endif /* !__lint */
#include <string.h>
@@ -499,7 +499,7 @@ cd9660_makefs(const char *image, const c
diskStructure->isoLevel);
if (diskStructure->isoLevel < 2 &&
diskStructure->allow_multidot)
- errx(1, "allow-multidot requires iso level of 2");
+ errx(EXIT_FAILURE, "allow-multidot requires iso level of 2");
assert(image != NULL);
assert(dir != NULL);
@@ -540,10 +540,10 @@ cd9660_makefs(const char *image, const c
&numDirectories, &error);
if (TAILQ_EMPTY(&real_root->cn_children)) {
- errx(1, "%s: converted directory is empty. ", __func__,
- "Tree conversion failed");
+ errx(EXIT_FAILURE, "%s: converted directory is empty. "
+ "Tree conversion failed", __func__);
} else if (error != 0) {
- errx(1, "cd9660_makefs: tree conversion failed");
+ errx(EXIT_FAILURE, "%s: tree conversion failed", __func__);
} else {
if (diskStructure->verbose_level > 0)
printf("%s: tree converted\n", __func__);
@@ -579,7 +579,7 @@ cd9660_makefs(const char *image, const c
firstAvailableSector = cd9660_setup_boot(diskStructure,
firstAvailableSector);
if (firstAvailableSector < 0)
- errx(1, "setup_boot failed");
+ errx(EXIT_FAILURE, "setup_boot failed");
}
/* LE first, then BE */
diskStructure->primaryLittleEndianTableSector = firstAvailableSector;
@@ -1603,7 +1603,7 @@ cd9660_compute_full_filename(cd9660node
len = snprintf(buf, len, "%s/%s/%s", node->node->root,
node->node->path, node->node->name);
if (len > CD9660MAXPATH)
- errx(1, "Pathname too long.");
+ errx(EXIT_FAILURE, "Pathname too long.");
}
/* NEW filename conversion method */