1
0
mirror of https://github.com/systemd/systemd.git synced 2025-02-06 01:57:47 +03:00

makefs: normalize logging a bit

This commit is contained in:
Lennart Poettering 2020-05-18 18:32:17 +02:00
parent 0181ad85b3
commit a5a8fe2e8d

View File

@ -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;
}