console: Add slide command
diff --git a/common/console.c b/common/console.c
index bb952b51..958b07c7 100644
--- a/common/console.c
+++ b/common/console.c
@@ -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");
