add a changelog entry
[debian/elilo] / choosers / simple.c
index 9d90fd6a8c9280285e2546c8c14c0a2782a7b013..d0c38f7bee6dd89098c25db1f48a4ed13ee75db0 100644 (file)
@@ -32,6 +32,7 @@
 
 #include "elilo.h"
 #include "vars.h"
+#include "console.h"
 
 /* static is ugly but does the job here! */
 static CHAR16 **alt_argv;
@@ -40,8 +41,8 @@ static VOID
 display_label_info(CHAR16 *name)
 {
        CHAR16 *desc;
-       CHAR16 initrd_name[CMDLINE_MAXLEN];
-       CHAR16 vmcode_name[CMDLINE_MAXLEN];
+       CHAR16 initrd_name[PATHNAME_MAXLEN];
+       CHAR16 vmcode_name[PATHNAME_MAXLEN];
        CHAR16 options_tmp[CMDLINE_MAXLEN];
        CHAR16 options[CMDLINE_MAXLEN];
        CHAR16 kname[FILENAME_MAXLEN];
@@ -253,10 +254,10 @@ simple_choose(CHAR16 **argv, INTN argc, INTN index, CHAR16 *kname, CHAR16 *cmdli
 #      define BOOT_IMG_STR     L"BOOT_IMAGE="
        CHAR16 buffer[CMDLINE_MAXLEN];
        CHAR16 alt_buffer[CMDLINE_MAXLEN];
-       CHAR16 initrd_name[CMDLINE_MAXLEN];
-       CHAR16 vmcode_name[CMDLINE_MAXLEN];
+       CHAR16 initrd_name[PATHNAME_MAXLEN];
+       CHAR16 vmcode_name[PATHNAME_MAXLEN];
        CHAR16 args[CMDLINE_MAXLEN];
-       CHAR16 devname[CMDLINE_MAXLEN];
+       CHAR16 devname[PATHNAME_MAXLEN];
        CHAR16 dpath[FILENAME_MAXLEN];
        CHAR16 *slash_pos, *colon_pos, *backslash_pos;
        UINTN len;
@@ -288,8 +289,10 @@ restart:
        }
 
        if (elilo_opt.prompt) {
-               ret = select_kernel(buffer, sizeof(buffer));
+               console_textmode();
+               ret = select_kernel(buffer, CMDLINE_MAXLEN);
                if (ret == -1) return -1;
+               /* this function takes really the number of bytes ... */
                argc    = argify(buffer,sizeof(buffer), argv); 
                index   = 0;
        }
@@ -355,7 +358,7 @@ restart:
 
        if (elilo_opt.prompt == 0) {
                /* minimal printing */
-               Print(L"ELILO\n");
+               Print(L"ELILO v%s for EFI/%a\n", ELILO_VERSION, ELILO_ARCH);
                ret = wait_timeout(elilo_opt.delay);
                if (ret != 0) {
                        elilo_opt.prompt = 1;