summaryrefslogtreecommitdiff
path: root/metaentry.c
diff options
context:
space:
mode:
Diffstat (limited to 'metaentry.c')
-rw-r--r--metaentry.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/metaentry.c b/metaentry.c
index 257f86d..ac2960a 100644
--- a/metaentry.c
+++ b/metaentry.c
@@ -352,7 +352,8 @@ mentries_tofile(const struct metaentry *mlist, const char *path)
to = fopen(path, "w");
if (!to) {
- perror("fopen");
+ msg(MSG_CRITICAL, "Failed to open %s: %s\n",
+ path, strerror(errno));
exit(EXIT_FAILURE);
}
@@ -392,12 +393,14 @@ mentries_fromfile(struct metaentry **mlist, const char *path)
fd = open(path, O_RDONLY);
if (fd < 0) {
- perror("open");
+ msg(MSG_CRITICAL, "Failed to open %s: %s\n",
+ path, strerror(errno));
exit(EXIT_FAILURE);
}
if (fstat(fd, &sbuf)) {
- perror("fstat");
+ msg(MSG_CRITICAL, "Failed to stat %s: %s\n",
+ path, strerror(errno));
exit(EXIT_FAILURE);
}