From 95372b71c989137f64b3b6e34cc1b0242ab088b1 Mon Sep 17 00:00:00 2001 From: mintsuki Date: Tue, 20 Jun 2023 11:10:33 +0200 Subject: [PATCH] console: Add firmware type command --- common/console.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/common/console.c b/common/console.c index a0b099fd..bb952b51 100644 --- a/common/console.c +++ b/common/console.c @@ -19,6 +19,7 @@ static void console_help(void) { "clear -- Clear the console.\n" "%s" "lsvol -- List volumes.\n" + "firmware -- Show firmware type.\n" "version -- Print version.\n" "copyright -- Print copyright.\n" "help -- Print this help message.\n", @@ -49,6 +50,14 @@ void console(void) { config_ready = true; boot(new_entry); } + } else if (strcmp(prompt, "firmware") == 0) { +#if defined (BIOS) + print("BIOS\n"); +#elif defined (UEFI) + print("UEFI\n"); +#else + print("unknown\n"); +#endif } else if (strcmp(prompt, "version") == 0) { print(LIMINE_VERSION "\n"); } else if (strcmp(prompt, "copyright") == 0) {