X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fmdadm.git;a=blobdiff_plain;f=Dump.c;fp=Dump.c;h=736bcb608496b355e33f77aa92cbf7f31c2ffe9d;hp=38e8f238a156f22b61b0e8dd8f89f62abed1d607;hb=75562b57d43bd252399b55d0004b8eac4b337a67;hpb=69068584f9ed68b8b2736287a1c9863e11b741d5 diff --git a/Dump.c b/Dump.c index 38e8f238..736bcb60 100644 --- a/Dump.c +++ b/Dump.c @@ -272,6 +272,11 @@ int Restore_metadata(char *dev, char *dir, struct context *c, fname); goto err; } + if (stat(fname, &stb) != 0) { + pr_err("Could not stat %s for --restore.\n", + fname); + goto err; + } if (((unsigned long long)stb.st_size) != size) { pr_err("%s is not the same size as %s - cannot restore.\n", fname, dev);