From e133eea4413abd51804bb2c29444d9d214f25c48 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Thu, 9 Feb 2012 23:29:36 +0100 Subject: [PATCH] Fixes some error messages. --- state.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/state.c b/state.c index 6dda7e04..438b23c9 100644 --- a/state.c +++ b/state.c @@ -574,7 +574,7 @@ void state_read(struct snapraid_state* state) } else { /* if it's real error of an existing file, abort */ if (errno != ENOENT) { - fprintf(stderr, "Error opening the content file '%s'\n", path); + fprintf(stderr, "Error opening the content file '%s'. %s.\n", path, strerror(errno)); exit(EXIT_FAILURE); } @@ -1107,7 +1107,7 @@ void state_write(struct snapraid_state* state) /* open all the content files */ f = sopen_multi_write(count_content); if (!f) { - fprintf(stderr, "Error opening the content files\n"); + fprintf(stderr, "Error opening the content files.\n"); exit(EXIT_FAILURE); } @@ -1118,7 +1118,7 @@ void state_write(struct snapraid_state* state) char tmp[PATH_MAX]; pathprint(tmp, sizeof(tmp), "%s.tmp", content->content); if (sopen_multi_file(f, k, tmp) != 0) { - fprintf(stderr, "Error operning the content file '%s'. %s.\n", tmp, strerror(errno)); + fprintf(stderr, "Error opening the content file '%s'. %s.\n", tmp, strerror(errno)); exit(EXIT_FAILURE); } ++k;