--- gnu-efi-2.0/elilo/elilo.c.verbosity Fri Apr 20 18:33:42 2001 +++ gnu-efi-2.0/elilo/elilo.c Fri Apr 20 19:12:55 2001 @@ -99,7 +99,8 @@ return ELILO_BOOT_ERROR; } - Print(W2U(L"Using %a loader\r\n"), ldops->ld_name); + if (elilo_opt.verbose) + Print(W2U(L"Using %a loader\r\n"), ldops->ld_name); ret = ldops->ld_load_kernel(dev, fops, kname, kentry, kend); @@ -313,6 +314,7 @@ static CHAR16 initrd_name[CMDLINE_MAXLEN]; static CHAR16 args[CMDLINE_MAXLEN]; static CHAR16 final_args[CMDLINE_MAXLEN]; + static INTN first=0; CHAR16 *ptr; EFI_STATUS status; @@ -389,12 +392,22 @@ split_args(buffer, &kname, &args); #endif - Print(W2U(L"kernel is '%s'\r\n"), kname); - Print(W2U(L"arguments are '%s'\r\n"), args); + if (elilo_opt.verbose) { + Print(W2U(L"kernel is '%s'\r\n"), kname); + Print(W2U(L"arguments are '%s'\r\n"), args); - if (elilo_opt.initrd_file) Print(W2U(L"initrd is '%s'\r\n"), elilo_opt.initrd_file); + if (elilo_opt.initrd_file) + Print(W2U(L"initrd is '%s'\r\n"), elilo_opt.initrd_file); + } + + if (!first) { + if (!elilo_opt.verbose) + Print(W2U(L"ELILO")); + first++; + } - bootmode = waitkey_timeout(elilo_opt.timeout, buffer); + if (!argv[index]) + bootmode = waitkey_timeout(elilo_opt.timeout, buffer); switch(bootmode) { case ELILO_BOOT_ABORTED: return ELILO_BOOT_ABORTED; @@ -403,7 +416,7 @@ if (select_kernel(buffer, sizeof(buffer)) == ELILO_BOOT_ERROR) return EFI_LOAD_ERROR; -Print(W2U(L"buffer is '%s'\r\n"), buffer); + DBG_PRINT((W2U(L"buffer is '%s'\r\n"), buffer)); //split_args(buffer, kname, args); @@ -416,13 +429,15 @@ case ELILO_BOOT_AUTO: case ELILO_BOOT_DEFAULT: /* nothing to do here */ + Print(W2U(L"\r\n")); break; default: Print(W2U(L"unkown bootmode\r\n")); return ELILO_BOOT_ERROR; } retry_default: - Print(W2U(L"Booting '%s' with args='%s'\r\n"), kname, args); + if (elilo_opt.verbose) + Print(W2U(L"Booting '%s' with args='%s'\r\n"), kname, args); /* * Now let's try to load the kernel ! @@ -449,8 +464,10 @@ goto retry_default; case ELILO_BOOT_ABORTED: - Print(W2U(L"Kernel : '%s'\r\n"), kname); - Print(W2U(L"Arguments : '%s'\r\n"), args); + if (elilo_opt.verbose) { + Print(W2U(L"Kernel : '%s'\r\n"), kname); + Print(W2U(L"Arguments : '%s'\r\n"), args); + } /* we drop initrd in case we aborted the load */ elilo_opt.initrd_file = NULL; goto retry_interactive; @@ -488,8 +505,10 @@ */ free_kmem(); - Print(W2U(L"kernel is '%s'\r\n"), kname); - Print(W2U(L"arguments are '%s'\r\n"), args); + if (elilo_opt.verbose) { + Print(W2U(L"kernel is '%s'\r\n"), kname); + Print(W2U(L"arguments are '%s'\r\n"), args); + } goto retry_interactive; } @@ -500,7 +519,9 @@ /* * Do we want to wait for keypress here ? */ - Print(W2U(L"Starting kernel at 0x%lx\r\n"), kentry); + if (elilo_opt.verbose) { + Print(W2U(L"Starting kernel at 0x%lx\r\n"), kentry); + } if (bootmode != ELILO_BOOT_AUTO && elilo_opt.noquery==0) { if(wait_keypress_abort() != ELILO_BOOT_SUCCESS) goto exit_error; @@ -658,7 +679,8 @@ return EFI_LOAD_ERROR; } - Print(W2U(L"Using %a access\r\n"), fops->fops_name); + if (elilo_opt.verbose) + Print(W2U(L"Using %a access\r\n"), fops->fops_name); main_loop(info->DeviceHandle, fops, argv, argc, Optind, image); /* should not return */ --- gnu-efi-2.0/elilo/plain_loader.c.verbosity Thu Apr 5 15:37:54 2001 +++ gnu-efi-2.0/elilo/plain_loader.c Fri Apr 20 18:33:42 2001 @@ -101,7 +101,7 @@ } static INTN -load_elf(INTN fd, fileops_t *fops, VOID *kentry, VOID *kend) +load_elf(INTN fd, fileops_t *fops, VOID *kentry, VOID *kend, CHAR16 *kname) { Elf64_Ehdr ehdr; Elf64_Phdr *phdrs; @@ -226,8 +226,10 @@ * virtual address where the kernel code starts */ - Print(W2U(L"Press any key to interrupt\r\n")); - Print(W2U(L"Loading kernel..")); + if (elilo_opt.verbose) { + Print(W2U(L"Press any key to interrupt\r\n")); + } + Print(W2U(L"Loading %s..."), kname); /* Second pass: * Walk through the program headers @@ -311,7 +313,7 @@ status = fops->fops_open(dev, kname, &fd); if (EFI_ERROR(status)) return ELILO_BOOT_ERROR; - ret = load_elf(fd, fops, kentry, kend); + ret = load_elf(fd, fops, kentry, kend, kname); fops->fops_close(fd); --- gnu-efi-2.0/elilo/util.c.verbosity Thu Apr 5 13:46:18 2001 +++ gnu-efi-2.0/elilo/util.c Fri Apr 20 18:33:42 2001 @@ -96,14 +96,16 @@ return ELILO_BOOT_ABORTED; } - Print(W2U(L"Press ENTER to continue or ANY other key to cancel\r\n")); + if (elilo_opt.verbose) + Print(W2U(L"Press ENTER to continue or ANY other key to cancel\r\n")); list[0] = timer; list[1] = systab->ConIn->WaitForKey; do { - Print(W2U(L"%s autoboot in %-3d seconds\r"), kernel_name, timeout); + if (elilo_opt.verbose) + Print(W2U(L"%s autoboot in %-3d seconds\r"), kernel_name, timeout); status = BS->WaitForEvent(2, list, &idx); if (EFI_ERROR(status)) { PRINT_ERR((W2U(L"waitkey WaitForEvent failed %r"), status));