From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LYTSx-0004sL-Mz for qemu-devel@nongnu.org; Sat, 14 Feb 2009 17:58:31 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LYTSx-0004rr-92 for qemu-devel@nongnu.org; Sat, 14 Feb 2009 17:58:31 -0500 Received: from [199.232.76.173] (port=32931 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LYTSw-0004rh-Vl for qemu-devel@nongnu.org; Sat, 14 Feb 2009 17:58:31 -0500 Received: from mout.perfora.net ([74.208.4.194]:60884) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LYTSw-0008KY-IM for qemu-devel@nongnu.org; Sat, 14 Feb 2009 17:58:30 -0500 From: Cory Fields Date: Sat, 14 Feb 2009 18:57:04 -0500 Message-Id: <1234655826-25283-3-git-send-email-FOSS@AtlasTechnologiesInc.com> In-Reply-To: <1234655826-25283-1-git-send-email-FOSS@AtlasTechnologiesInc.com> References: <1234655826-25283-1-git-send-email-FOSS@AtlasTechnologiesInc.com> Subject: [Qemu-devel] [PATCH] Add args for quiet and prompt Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Syntax is -boot [cad],prompt=x,quiet=x where x is [0,1,true,false] Boot drive is mandatory If prompt is set user will see "Press f12 for boot menu" This behavior has changed, it is now off by default If quiet is set user will see no normal text output from bios. Errors will stil be displayed. Signed-off-by: Cory Fields --- vl.c | 43 ++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 40 insertions(+), 3 deletions(-) diff --git a/vl.c b/vl.c index 5f237d0..3b4d866 100644 --- a/vl.c +++ b/vl.c @@ -230,6 +230,8 @@ int no_shutdown = 0; int cursor_hide = 1; int graphic_rotate = 0; int daemonize = 0; +int biosprompt = 0; +int quietbios = 0; const char *option_rom[MAX_OPTION_ROMS]; int nb_option_roms; int semihosting_enabled = 0; @@ -3911,6 +3913,10 @@ static void help(int exitcode) "-sd file use 'file' as SecureDigital card image\n" "-pflash file use 'file' as a parallel flash image\n" "-boot [a|c|d|n] boot on floppy (a), hard disk (c), CD-ROM (d), or network (n)\n" + " [,quiet=true|false]\n" + " hide bios text [default=false]\n" + " [,prompt=true|false]\n" + " hide boot menu prompt [default=true]\n" "-snapshot write to temporary files instead of disk image files\n" "-m megs set virtual RAM size to megs MB [default=%d]\n" #ifndef _WIN32 @@ -4865,14 +4871,14 @@ int main(int argc, char **argv, char **envp) drive_add(optarg, CDROM_ALIAS); break; case QEMU_OPTION_boot: - boot_devices = optarg; /* We just do some generic consistency checks */ { /* Could easily be extended to 64 devices if needed */ const char *p; - + char boot_opt_val[6]=""; //Holds value of RHS of boot option. + boot_devices_bitmap = 0; - for (p = boot_devices; *p != '\0'; p++) { + for (p = optarg; *p != '\0' && *p != ','; p++) { /* Allowed boot devices are: * a b : floppy disk drives * c ... f : IDE disk drives @@ -4893,6 +4899,37 @@ int main(int argc, char **argv, char **envp) } boot_devices_bitmap |= 1 << (*p - 'a'); } + + + if (*p == ',') p++; + if (get_param_value(boot_opt_val, sizeof(boot_opt_val), "quiet", p)) { + if (!strcmp(boot_opt_val, "true") || !strcmp(boot_opt_val, "1")) { + quietbios=1; + biosprompt=0; + } + else if (!strcmp(boot_opt_val, "false") || !strcmp(boot_opt_val, "0")) { + quietbios=0; + } + else { + printf("Boot option not recognized\n"); + exit(1); + } + } + + if (get_param_value(boot_opt_val, sizeof(boot_opt_val), "prompt", p)){ + if (!strcmp(boot_opt_val, "true") || !strcmp(boot_opt_val, "1")) { + biosprompt=1; + } + else if (!strcmp(boot_opt_val, "false") || !strcmp(boot_opt_val, "0")) { + biosprompt=0; + } + else { + printf("Boot option not recognized\n"); + exit(1); + } + } + boot_devices=strtok(optarg,","); + printf("boot_devices: %s\n",boot_devices); } break; case QEMU_OPTION_fda: -- 1.6.0.6