diff options
author | Lennart Poettering <lennart@poettering.net> | 2020-05-18 18:32:17 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2020-05-18 20:50:03 +0200 |
commit | a5a8fe2e8dbb9bc1981064d273b626d4aa187152 (patch) | |
tree | bf2e5fe2ef94d51eef7ce422489cdaed84e154c0 /src/partition | |
parent | makefs: lock device while we operate (diff) | |
download | systemd-a5a8fe2e8dbb9bc1981064d273b626d4aa187152.tar.xz systemd-a5a8fe2e8dbb9bc1981064d273b626d4aa187152.zip |
makefs: normalize logging a bit
Diffstat (limited to 'src/partition')
-rw-r--r-- | src/partition/makefs.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/partition/makefs.c b/src/partition/makefs.c index 128aa41044..97f50c9033 100644 --- a/src/partition/makefs.c +++ b/src/partition/makefs.c @@ -76,15 +76,12 @@ static int run(int argc, char *argv[]) { log_info("%s is not a block device.", device); r = probe_filesystem(device, &detected); + if (r == -EUCLEAN) + return log_error_errno(r, "Ambiguous results of probing for file system on \"%s\", refusing to proceed.", device); if (r < 0) - return log_warning_errno(r, - r == -EUCLEAN ? - "Cannot reliably determine probe \"%s\", refusing to proceed." : - "Failed to probe \"%s\": %m", - device); - + return log_error_errno(r, "Failed to probe \"%s\": %m", device); if (detected) { - log_info("%s is not empty (type %s), exiting", device, detected); + log_info("'%s' is not empty (contains file system of type %s), exiting.", device, detected); return 0; } |