+ .type = QEMU_OPT_STRING,
+ .help = "free-form string used to describe fd",
},
{ /* end of list */ }
},
diff --git a/qemu-options.hx b/qemu-options.hx
index 7d97f96..513530f 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -149,7 +149,7 @@ using @file{/dev/cdrom} as filename (@pxref{host_drives}).
ETEXI
DEF("drive", HAS_ARG, QEMU_OPTION_drive,
- "-drive [file=file][,if=type][,bus=n][,unit=m][,media=d][,index=i]\n"
+ "-drive
[file=file|fd=fd[,opaque=o]][,if=type][,bus=n][,unit=m][,media=d][,index=i]\n"
" [,cyls=c,heads=h,secs=s[,trans=t]][,snapshot=on|off]\n"
"
[,cache=writethrough|writeback|none|directsync|unsafe][,format=f]\n"
" [,serial=s][,addr=A][,id=name][,aio=threads|native]\n"
@@ -170,6 +170,12 @@ this drive. If the filename contains comma, you must
double it
Special files such as iSCSI devices can be specified using protocol
specific URLs. See the section for "Device URL Syntax" for more information.
address@hidden address@hidden
+This option defines which disk image (@pxref{disk_images}) file descriptor to
+use with this drive.
address@hidden address@hidden
+This option defines a free-form string that describes @var{fd}. This is used
+when storing @var{fd} in a file descriptor set.
@item address@hidden
This option defines on which type on interface the drive is connected.
Available types are: ide, scsi, sd, mtd, floppy, pflash, virtio.
@@ -257,12 +263,17 @@ qemu-system-i386 -drive file=file,index=2,media=disk
qemu-system-i386 -drive file=file,index=3,media=disk
@end example
+You can open an image using a pre-opened file descriptor:
address@hidden
+qemu-system-i386 -drive fd=24,opaque="rdwr:/path/to/file",index=0,media=disk
address@hidden example
+
You can connect a CDROM to the slave of ide0:
@example
qemu-system-i386 -drive file=file,if=ide,index=1,media=cdrom
@end example
-If you don't specify the "file=" argument, you define an empty drive:
+If you don't specify the "file=" or "fd=" arguments, you define an empty drive:
@example
qemu-system-i386 -drive if=ide,index=1,media=cdrom
@end example
--
1.7.11.4