fsck: use log_device_*()

This commit is contained in:
Yu Watanabe
2018-10-22 12:39:51 +09:00
parent 71f79b56cf
commit 7bd33dbd6e

View File

@@ -347,7 +347,7 @@ int main(int argc, char *argv[]) {
r = sd_device_get_devname(dev, &device);
if (r < 0) {
log_error_errno(r, "Failed to detect device node of root directory: %m");
log_device_error_errno(dev, r, "Failed to detect device node of root directory: %m");
goto finish;
}
@@ -357,9 +357,9 @@ int main(int argc, char *argv[]) {
if (sd_device_get_property_value(dev, "ID_FS_TYPE", &type) >= 0) {
r = fsck_exists(type);
if (r < 0)
log_warning_errno(r, "Couldn't detect if fsck.%s may be used for %s, proceeding: %m", type, device);
log_device_warning_errno(dev, r, "Couldn't detect if fsck.%s may be used, proceeding: %m", type);
else if (r == 0) {
log_info("fsck.%s doesn't exist, not checking file system on %s.", type, device);
log_device_info(dev, "fsck.%s doesn't exist, not checking file system.", type);
goto finish;
}
}