From 19d660f383c71281c4405475e5919273ea183778 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Thu, 28 Apr 2011 21:50:41 +0200 Subject: [PATCH] More explicit messages if the growing of the parity file fails. --- parity.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/parity.c b/parity.c index dbaece59..0cf7e92b 100644 --- a/parity.c +++ b/parity.c @@ -78,16 +78,16 @@ int parity_create(const char* path, data_off_t size) #endif if (ret != 0) { if (errno == ENOSPC) { - fprintf(stderr, "Failed to grow parity file '%s' due lack of space.\n", path); + fprintf(stderr, "Failed to grow parity file '%s' to size %llu due lack of space.\n", path, size); } else { - fprintf(stderr, "Error growing parity file '%s'. %s.\n", path, strerror(errno)); + fprintf(stderr, "Error growing parity file '%s' to size %llu. Do you have enough space? %s.\n", path, size, strerror(errno)); } goto bail; } } else if (st.st_size > size) { ret = ftruncate(f, size); if (ret != 0) { - fprintf(stderr, "Error truncating parity file '%s'. %s.\n", path, strerror(errno)); + fprintf(stderr, "Error truncating parity file '%s' to size %llu. %s.\n", path, size, strerror(errno)); goto bail; } }