From e1387cd676185555e6f4125cf1dd039f8e1c6f31 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 18 May 2018 18:36:29 -0400 Subject: dedupe-range: correctly handle -errno statuses --- lib/dedupe-range.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/dedupe-range.c b/lib/dedupe-range.c index c9e9bb0..614c9c5 100644 --- a/lib/dedupe-range.c +++ b/lib/dedupe-range.c @@ -89,7 +89,10 @@ void dedupe_range(uint64_t src_length, struct filepos src, struct filepos *dsts) range->info[i].dest_offset += range->info[i].bytes_deduped; break; default: - assert(false); + assert(range->info[i].status < 0); + error(0, -range->info[i].status, "dedupe: %s", dsts[files_deduped+i].filename); + erred = true; + break; } } if (erred == true) -- cgit v1.2.3-2-g168b