Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jqiqr-0003RI-Dv for qemu-devel@nongnu.org; Tue, 29 Apr 2008 01:58:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jqiqq-0003QM-Bu for qemu-devel@nongnu.org; Tue, 29 Apr 2008 01:58:04 -0400 Received: from [199.232.76.173] (port=35837 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jqiqq-0003QH-8T for qemu-devel@nongnu.org; Tue, 29 Apr 2008 01:58:04 -0400 Received: from savannah.gnu.org ([199.232.41.3] helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Jqiqp-0007IR-QC for qemu-devel@nongnu.org; Tue, 29 Apr 2008 01:58:03 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1Jqiqo-0003VO-Q8 for qemu-devel@nongnu.org; Tue, 29 Apr 2008 05:58:02 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1Jqiqo-0003VI-8b for qemu-devel@nongnu.org; Tue, 29 Apr 2008 05:58:02 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Tue, 29 Apr 2008 05:58:02 +0000 Subject: [Qemu-devel] [4279] Describe the format= option in the --help output. 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 Revision: 4279 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4279 Author: aurel32 Date: 2008-04-29 05:58:01 +0000 (Tue, 29 Apr 2008) Log Message: ----------- Describe the format= option in the --help output. List the accepted values with format=?. Modified Paths: -------------- trunk/vl.c Modified: trunk/vl.c =================================================================== --- trunk/vl.c 2008-04-28 20:26:54 UTC (rev 4278) +++ trunk/vl.c 2008-04-29 05:58:01 UTC (rev 4279) @@ -4949,6 +4949,11 @@ return max_bus; } +static void bdrv_format_print(void *opaque, const char *name) +{ + fprintf(stderr, " %s", name); +} + static int drive_init(struct drive_opt *arg, int snapshot, QEMUMachine *machine) { @@ -5138,6 +5143,12 @@ } if (get_param_value(buf, sizeof(buf), "format", str)) { + if (strcmp(buf, "?") == 0) { + fprintf(stderr, "qemu: Supported formats:"); + bdrv_iterate_format(bdrv_format_print, NULL); + fprintf(stderr, "\n"); + return -1; + } drv = bdrv_find_format(buf); if (!drv) { fprintf(stderr, "qemu: '%s' invalid format\n", buf); @@ -7634,9 +7645,9 @@ "-hda/-hdb file use 'file' as IDE hard disk 0/1 image\n" "-hdc/-hdd file use 'file' as IDE hard disk 2/3 image\n" "-cdrom file use 'file' as IDE cdrom image (cdrom is ide1 master)\n" - "-drive [file=file][,if=type][,bus=n][,unit=m][,media=d][index=i]\n" - " [,cyls=c,heads=h,secs=s[,trans=t]][snapshot=on|off]" - " [,cache=on|off]\n" + "-drive [file=file][,if=type][,bus=n][,unit=m][,media=d][,index=i]\n" + " [,cyls=c,heads=h,secs=s[,trans=t]][,snapshot=on|off]\n" + " [,cache=on|off][,format=f]\n" " use 'file' as a drive image\n" "-mtdblock file use 'file' as on-board Flash memory image\n" "-sd file use 'file' as SecureDigital card image\n"