X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fdetect-virt%2Fdetect-virt.c;h=9a924117db64f5f8a8463318bcc181de329c5bf1;hb=ce43e484465050c619ea9a1991d49b3d6215028b;hp=ff5bee56f91c5f4e7f62920dfdc81d0ad4c413c5;hpb=601185b43da638b1c74153deae01dbd518680889;p=elogind.git diff --git a/src/detect-virt/detect-virt.c b/src/detect-virt/detect-virt.c index ff5bee56f..9a924117d 100644 --- a/src/detect-virt/detect-virt.c +++ b/src/detect-virt/detect-virt.c @@ -131,7 +131,7 @@ int main(int argc, char *argv[]) { v = detect_virtualization(&id); if (v < 0) { - log_error("Failed to check for virtualization: %s", strerror(-v)); + log_error_errno(v, "Failed to check for virtualization: %m"); return EXIT_FAILURE; } @@ -142,7 +142,7 @@ int main(int argc, char *argv[]) { case ONLY_CONTAINER: r = detect_container(&id); if (r < 0) { - log_error("Failed to check for container: %s", strerror(-r)); + log_error_errno(r, "Failed to check for container: %m"); return EXIT_FAILURE; } @@ -152,7 +152,7 @@ int main(int argc, char *argv[]) { case ONLY_VM: r = detect_vm(&id); if (r < 0) { - log_error("Failed to check for vm: %s", strerror(-r)); + log_error_errno(r, "Failed to check for vm: %m"); return EXIT_FAILURE; }