summaryrefslogtreecommitdiff
path: root/tools/adk
diff options
context:
space:
mode:
Diffstat (limited to 'tools/adk')
-rw-r--r--tools/adk/pkgmaker.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/tools/adk/pkgmaker.c b/tools/adk/pkgmaker.c
index e2b6e6e99..dd4b90f46 100644
--- a/tools/adk/pkgmaker.c
+++ b/tools/adk/pkgmaker.c
@@ -37,10 +37,11 @@
static int nobinpkgs;
-static void fatal_error(const char *message) {
-
- fprintf(stderr, "Fatal error. %s\n", message);
- exit(1);
+#define fatal_error(...) { \
+ fprintf(stderr, "Fatal error. "); \
+ fprintf(stderr, __VA_ARGS__); \
+ fprintf(stderr, "\n"); \
+ exit(1); \
}
static int parse_var_hash(char *buf, const char *varname, StrMap *strmap) {
@@ -304,7 +305,8 @@ int main() {
fclose(section);
}
} else
- fatal_error("Can not find section description for package.");
+ fatal_error("Can not find section description for package %s.",
+ pkgdirp->d_name);
fclose(pkg);
continue;
@@ -501,7 +503,7 @@ int main() {
fclose(section);
}
} else
- fatal_error("Can not find section description for package");
+ fatal_error("Can not find section description for package %s.", pkgdirp->d_name);
unlink(path);
cfg = fopen(path, "w");