1 --- vl.c 2008-01-06 14:38:42.000000000 -0500
2 +++ vl.c 2008-05-13 09:56:45.000000000 -0400
3 @@ -4877,13 +4877,14 @@
5 int cyls, heads, secs, translation;
6 BlockDriverState *bdrv;
7 + BlockDriver *drv = NULL;
12 char *params[] = { "bus", "unit", "if", "index", "cyls", "heads",
13 "secs", "trans", "media", "snapshot", "file",
15 + "cache", "format", NULL };
17 if (check_params(buf, sizeof(buf), params, str) < 0) {
18 fprintf(stderr, "qemu: unknowm parameter '%s' in '%s'\n",
19 @@ -5051,6 +5052,14 @@
23 + if (get_param_value(buf, sizeof(buf), "format", str)) {
24 + drv = bdrv_find_format(buf);
26 + fprintf(stderr, "qemu: '%s' invalid format\n", buf);
31 get_param_value(file, sizeof(file), "file", str);
33 /* compute bus and unit according index */
35 bdrv_flags |= BDRV_O_SNAPSHOT;
37 bdrv_flags |= BDRV_O_DIRECT;
38 - if (bdrv_open(bdrv, file, bdrv_flags) < 0 || qemu_key_check(bdrv, file)) {
39 + if (bdrv_open2(bdrv, file, bdrv_flags, drv) < 0 || qemu_key_check(bdrv, file)) {
40 fprintf(stderr, "qemu: could not open disk image %s\n",
43 --- qemu-doc.texi 2008-01-06 14:38:42.000000000 -0500
44 +++ qemu-doc.texi 2008-05-13 09:57:57.000000000 -0400
46 @var{snapshot} is "on" or "off" and allows to enable snapshot for given drive (see @option{-snapshot}).
47 @item cache=@var{cache}
48 @var{cache} is "on" or "off" and allows to disable host cache to access data.
49 +@item format=@var{format}
50 +Specify which disk @var{format} will be used rather than detecting
51 +the format. Can be used to specifiy format=raw to avoid interpreting
52 +an untrusted format header.
55 Instead of @option{-cdrom} you can use: