summaryrefslogtreecommitdiff
path: root/src/partition/makefs.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-11-30 12:09:36 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-11-30 20:46:30 +0100
commit7cc84b2cd385b8a838347c2ff29c978689dadf84 (patch)
tree468ffefa68d83ca03d2f79f7406fd919b88eb5c9 /src/partition/makefs.c
parent7f2806d50937a7fbe6d673ce8fc62634129c3a12 (diff)
downloadsystemd-7cc84b2cd385b8a838347c2ff29c978689dadf84.tar.gz
dissect-image: return error if results are ambiguous
We let the caller make the decision. Existing callers are OK with treating an ambiguous result the same as no content, but makefs and growfs should refuse such partitions.
Diffstat (limited to 'src/partition/makefs.c')
-rw-r--r--src/partition/makefs.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/partition/makefs.c b/src/partition/makefs.c
index c24c6ebcde..e5e125255b 100644
--- a/src/partition/makefs.c
+++ b/src/partition/makefs.c
@@ -90,7 +90,11 @@ int main(int argc, char *argv[]) {
r = probe_filesystem(device, &detected);
if (r < 0) {
- log_warning_errno(r, "Failed to probe \"%s\": %m", device);
+ log_warning_errno(r,
+ r == -EUCLEAN ?
+ "Cannot reliably determine probe \"%s\", refusing to proceed." :
+ "Failed to probe \"%s\": %m",
+ device);
goto finish;
}