mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zipl: be verbose about secure boot support
Report the details about the state of secure boot on the system when running zipl in verbose mode. GitHub-ID: https://github.com/ibm-s390-linux/s390-tools/pull/133 Signed-off-by: Dan Horák <dan@danny.cz> Reviewed-by: Stefan Haberland <sth@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
@@ -128,16 +128,27 @@ check_secure_boot_support(void)
|
||||
unsigned int val;
|
||||
FILE *fp;
|
||||
|
||||
if (verbose)
|
||||
printf("Secure boot support: ");
|
||||
|
||||
fp = fopen(ZIPL_SIPL_PATH, "r");
|
||||
if (!fp)
|
||||
if (!fp) {
|
||||
if (verbose)
|
||||
printf("not available\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (fscanf(fp, "%d", &val) != 1) {
|
||||
if (verbose)
|
||||
printf("error\n");
|
||||
fclose(fp);
|
||||
return false;
|
||||
}
|
||||
fclose(fp);
|
||||
|
||||
if (verbose)
|
||||
printf("%s\n", val ? "yes" : "no");
|
||||
|
||||
return val ? true : false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user