dedup

deduplicating backup program
git clone git://git.2f30.org/dedup
Log | Files | Refs | README | LICENSE

commit 4c5ae16edd863718cfffd011e983efd1946b4264
parent 5e2a473da8667cab7b0df876ffa9e02ff2dae096
Author: sin <sin@2f30.org>
Date:   Fri,  3 May 2019 15:02:52 +0100

Report unknown errors

Diffstat:
Mblock.c | 5++++-
Msnap.c | 5++++-
2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/block.c b/block.c @@ -175,7 +175,10 @@ berr(char *fmt, ...) va_start(ap, fmt); vfprintf(stderr, fmt, ap); - fprintf(stderr, ": %s\n", errbuf); + if (errbuf[0] == '\0') + fprintf(stderr, ": unknown error\n"); + else + fprintf(stderr, ": %s\n", errbuf); va_end(ap); exit(1); } diff --git a/snap.c b/snap.c @@ -243,7 +243,10 @@ serr(char *fmt, ...) va_start(ap, fmt); vfprintf(stderr, fmt, ap); - fprintf(stderr, ": %s\n", errbuf); + if (errbuf[0] == '\0') + fprintf(stderr, ": unknown error\n"); + else + fprintf(stderr, ": %s\n", errbuf); va_end(ap); exit(1); }