int *fd,
virLogManager *logManager,
virSecurityManager *secManager,
- virQEMUCaps *qemuCaps,
virQEMUDriverConfig *cfg,
const virDomainDef *def)
{
- /* Technically, to pass an FD via /dev/fdset we don't need
- * any capability check because X_QEMU_CAPS_ADD_FD is already
- * assumed. But keeping the old style is still handy when
- * building a standalone command line (e.g. for tests). */
- if (!logManager &&
- !virQEMUCapsGet(qemuCaps, QEMU_CAPS_CHARDEV_FD_PASS_COMMANDLINE))
- return 0;
-
if (logManager) {
int flags = 0;
&charpriv->fd,
data->logManager,
data->secManager,
- data->qemuCaps,
data->cfg,
data->def) < 0)
return -1;
&charpriv->logfd,
data->logManager,
data->secManager,
- data->qemuCaps,
data->cfg,
data->def) < 0)
return -1;
-device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1 \
-device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \
-device pcie-root-port,port=16,chassis=3,id=pci.3,bus=pcie.0,addr=0x2 \
--chardev pty,id=charserial0,logfile=/tmp/log,logappend=on \
+-add-fd set=0,fd=1751 \
+-chardev pty,id=charserial0,logfile=/dev/fdset/0,logappend=on \
-device pci-serial,chardev=charserial0,id=serial0,bus=pci.2,addr=0x1 \
-msg timestamp=on
-device ccid-card-emulated,backend=certificates,cert1=cert1,,foo,cert2=cert2,cert3=cert3,db=/etc/pki/nssdb,,foo,id=smartcard0,bus=ccid0.0 \
-chardev tty,id=charserial0,path=/dev/ttyS2,,foo \
-device isa-serial,chardev=charserial0,id=serial0,index=1 \
--chardev file,id=charserial1,path=/tmp/serial.log,,foo,append=on \
+-add-fd set=0,fd=1750 \
+-chardev file,id=charserial1,path=/dev/fdset/0,append=on \
-device isa-serial,chardev=charserial1,id=serial1,index=0 \
-chardev pipe,id=charchannel0,path=/tmp/guestfwd,,foo \
-netdev user,guestfwd=tcp:10.0.2.1:4600-chardev:charchannel0,id=channel0 \
-usb \
-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
-device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
--chardev file,id=charserial0,path=/tmp/serial.log,append=on \
+-add-fd set=0,fd=1750 \
+-chardev file,id=charserial0,path=/dev/fdset/0,append=on \
-device isa-serial,chardev=charserial0,id=serial0,index=0 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
-msg timestamp=on
-usb \
-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
-device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
--chardev file,id=charserial0,path=/tmp/serial.log,logfile=/var/lib/libvirt/qemu/demo-serial.log,logappend=off \
+-add-fd set=0,fd=1750 \
+-add-fd set=1,fd=1751 \
+-chardev file,id=charserial0,path=/dev/fdset/0,append=on,logfile=/dev/fdset/1,logappend=on \
-device isa-serial,chardev=charserial0,id=serial0,index=0 \
-msg timestamp=on
-device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
-chardev pty,id=charserial0 \
-device isa-serial,chardev=charserial0,id=serial0,index=0 \
--chardev file,id=charserial1,path=/tmp/serial.log \
+-add-fd set=0,fd=1750 \
+-chardev file,id=charserial1,path=/dev/fdset/0,append=on \
-device isa-serial,chardev=charserial1,id=serial1,index=1 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
-msg timestamp=on
break;
case VIR_DOMAIN_CHR_TYPE_FILE:
- if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_CHARDEV_FD_PASS_COMMANDLINE)) {
- if (fcntl(1750, F_GETFD) != -1)
- abort();
- charpriv->fd = 1750;
- }
+ if (fcntl(1750, F_GETFD) != -1)
+ abort();
+ charpriv->fd = 1750;
break;
case VIR_DOMAIN_CHR_TYPE_UNIX:
}
if (chardev->logfile) {
- if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_CHARDEV_FD_PASS_COMMANDLINE)) {
- if (fcntl(1751, F_GETFD) != -1)
- abort();
- charpriv->logfd = 1751;
- }
+ if (fcntl(1751, F_GETFD) != -1)
+ abort();
+ charpriv->logfd = 1751;
}
return 0;