From: Lennart Poettering Date: Mon, 18 May 2020 16:32:17 +0000 (+0200) Subject: makefs: normalize logging a bit X-Git-Tag: v246-rc1~336^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a5a8fe2e8dbb9bc1981064d273b626d4aa187152;p=thirdparty%2Fsystemd.git makefs: normalize logging a bit --- diff --git a/src/partition/makefs.c b/src/partition/makefs.c index 128aa41044a..97f50c90335 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; }