On my system the boot and EFI partitions are protected, hence "bootctl
status" can't find the ESP, and then the tool continues with arg_path ==
NULL, which it really should not. Handle these cases, and simply
suppress all output that needs arg_path.
} else
printf("System:\n Not booted with EFI\n\n");
- k = status_binaries(arg_path, uuid);
- if (k < 0)
- r = k;
+ if (arg_path) {
+ k = status_binaries(arg_path, uuid);
+ if (k < 0)
+ r = k;
+ }
if (is_efi_boot()) {
k = status_variables();
r = k;
}
- k = status_entries(arg_path, uuid);
- if (k < 0)
- r = k;
+ if (arg_path) {
+ k = status_entries(arg_path, uuid);
+ if (k < 0)
+ r = k;
+ }
return r;
}