console: Add slide command

This commit is contained in:
mintsuki 2023-07-27 23:09:42 -05:00
parent 98f30bfdd6
commit 4b452e69a4
1 changed files with 11 additions and 0 deletions

View File

@ -20,6 +20,9 @@ static void console_help(void) {
"%s"
"lsvol -- List volumes.\n"
"firmware -- Show firmware type.\n"
#if defined (UEFI)
"slide -- Print load slide offset.\n"
#endif
"version -- Print version.\n"
"copyright -- Print copyright.\n"
"help -- Print this help message.\n",
@ -27,6 +30,10 @@ static void console_help(void) {
);
}
#if defined (UEFI)
extern symbol __image_base;
#endif
void console(void) {
print("Welcome to the Limine console.\nType 'help' for more information.\n\n");
@ -57,6 +64,10 @@ void console(void) {
print("UEFI\n");
#else
print("unknown\n");
#endif
#if defined (UEFI)
} else if (strcmp(prompt, "slide") == 0) {
print("%p\n", __image_base);
#endif
} else if (strcmp(prompt, "version") == 0) {
print(LIMINE_VERSION "\n");