mirror of https://github.com/xqemu/xqemu.git
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
* stefanha/trivial-patches: qemu-nbd: drop loop which can never loop Make python mandatory net/socket.c: Fix fd leak in net_socket_listen_init() error paths gdbstub: Fix fd leak in gdbserver_open() error path configure: Fix test for supported host CPU type configure: CONFIG_QEMU_INTERP_PREFIX only for user mode scsi virtio-blk usb-msd: Clean up device init error messages Strip trailing '\n' from error_report()'s first argument (again) qemu-options.hx: fix tls-channel help text
This commit is contained in:
commit
a2e4d53ec5
|
@ -300,8 +300,11 @@ else
|
|||
cpu=`uname -m`
|
||||
fi
|
||||
|
||||
ARCH=
|
||||
# Normalise host CPU name and set ARCH.
|
||||
# Note that this case should only have supported host CPUs, not guests.
|
||||
case "$cpu" in
|
||||
alpha|cris|ia64|lm32|m68k|microblaze|ppc|ppc64|sparc64|unicore32)
|
||||
ia64|ppc|ppc64|s390|s390x|sparc64)
|
||||
cpu="$cpu"
|
||||
;;
|
||||
i386|i486|i586|i686|i86pc|BePC)
|
||||
|
@ -319,20 +322,17 @@ case "$cpu" in
|
|||
mips*)
|
||||
cpu="mips"
|
||||
;;
|
||||
s390)
|
||||
cpu="s390"
|
||||
;;
|
||||
s390x)
|
||||
cpu="s390x"
|
||||
;;
|
||||
sparc|sun4[cdmuv])
|
||||
cpu="sparc"
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported CPU = $cpu"
|
||||
exit 1
|
||||
# This will result in either an error or falling back to TCI later
|
||||
ARCH=unknown
|
||||
;;
|
||||
esac
|
||||
if test -z "$ARCH"; then
|
||||
ARCH="$cpu"
|
||||
fi
|
||||
|
||||
# OS specific
|
||||
if check_define __linux__ ; then
|
||||
|
@ -1080,6 +1080,18 @@ echo "NOTE: The object files are built at the place where configure is launched"
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Now we have handled --enable-tcg-interpreter and know we're not just
|
||||
# printing the help message, bail out if the host CPU isn't supported.
|
||||
if test "$ARCH" = "unknown"; then
|
||||
if test "$tcg_interpreter" = "yes" ; then
|
||||
echo "Unsupported CPU = $cpu, will use TCG with TCI (experimental)"
|
||||
ARCH=tci
|
||||
else
|
||||
echo "Unsupported CPU = $cpu, try --enable-tcg-interpreter"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# check that the C compiler works.
|
||||
cat > $TMPC <<EOF
|
||||
int main(void) { return 0; }
|
||||
|
@ -1185,13 +1197,9 @@ if test "$solaris" = "yes" ; then
|
|||
fi
|
||||
fi
|
||||
|
||||
if test "$guest_agent" != "no" ; then
|
||||
if has $python; then
|
||||
:
|
||||
else
|
||||
echo "Python not found. Use --python=/path/to/python"
|
||||
exit 1
|
||||
fi
|
||||
if ! has $python; then
|
||||
echo "Python not found. Use --python=/path/to/python"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$target_list" ; then
|
||||
|
@ -2922,20 +2930,6 @@ echo "sysconfdir=$sysconfdir" >> $config_host_mak
|
|||
echo "docdir=$docdir" >> $config_host_mak
|
||||
echo "confdir=$confdir" >> $config_host_mak
|
||||
|
||||
case "$cpu" in
|
||||
i386|x86_64|alpha|arm|cris|hppa|ia64|lm32|m68k|microblaze|mips|mips64|ppc|ppc64|s390|s390x|sparc|sparc64|unicore32)
|
||||
ARCH=$cpu
|
||||
;;
|
||||
*)
|
||||
if test "$tcg_interpreter" = "yes" ; then
|
||||
echo "Unsupported CPU = $cpu, will use TCG with TCI (experimental)"
|
||||
ARCH=tci
|
||||
else
|
||||
echo "Unsupported CPU = $cpu, try --enable-tcg-interpreter"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
echo "ARCH=$ARCH" >> $config_host_mak
|
||||
if test "$debug_tcg" = "yes" ; then
|
||||
echo "CONFIG_DEBUG_TCG=y" >> $config_host_mak
|
||||
|
@ -3414,7 +3408,6 @@ echo "# Automatically generated by configure - do not modify" > $config_target_m
|
|||
bflt="no"
|
||||
target_nptl="no"
|
||||
interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_arch2/g"`
|
||||
echo "CONFIG_QEMU_INTERP_PREFIX=\"$interp_prefix1\"" >> $config_target_mak
|
||||
gdb_xml_files=""
|
||||
target_short_alignment=2
|
||||
target_int_alignment=4
|
||||
|
@ -3620,6 +3613,7 @@ if test "$target_softmmu" = "yes" ; then
|
|||
fi
|
||||
if test "$target_user_only" = "yes" ; then
|
||||
echo "CONFIG_USER_ONLY=y" >> $config_target_mak
|
||||
echo "CONFIG_QEMU_INTERP_PREFIX=\"$interp_prefix1\"" >> $config_target_mak
|
||||
fi
|
||||
if test "$target_linux_user" = "yes" ; then
|
||||
echo "CONFIG_LINUX_USER=y" >> $config_target_mak
|
||||
|
|
|
@ -2762,11 +2762,13 @@ static int gdbserver_open(int port)
|
|||
ret = bind(fd, (struct sockaddr *)&sockaddr, sizeof(sockaddr));
|
||||
if (ret < 0) {
|
||||
perror("bind");
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
ret = listen(fd, 0);
|
||||
if (ret < 0) {
|
||||
perror("listen");
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
return fd;
|
||||
|
|
|
@ -1515,7 +1515,7 @@ static int scsi_initfn(SCSIDevice *dev)
|
|||
DriveInfo *dinfo;
|
||||
|
||||
if (!s->qdev.conf.bs) {
|
||||
error_report("scsi-disk: drive property not set");
|
||||
error_report("drive property not set");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -1537,7 +1537,7 @@ static int scsi_initfn(SCSIDevice *dev)
|
|||
}
|
||||
|
||||
if (bdrv_is_sg(s->qdev.conf.bs)) {
|
||||
error_report("scsi-disk: unwanted /dev/sg*");
|
||||
error_report("unwanted /dev/sg*");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -374,13 +374,13 @@ static int scsi_generic_initfn(SCSIDevice *s)
|
|||
struct sg_scsi_id scsiid;
|
||||
|
||||
if (!s->conf.bs) {
|
||||
error_report("scsi-generic: drive property not set");
|
||||
error_report("drive property not set");
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* check we are really using a /dev/sg* file */
|
||||
if (!bdrv_is_sg(s->conf.bs)) {
|
||||
error_report("scsi-generic: not /dev/sg*");
|
||||
error_report("not /dev/sg*");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -396,13 +396,13 @@ static int scsi_generic_initfn(SCSIDevice *s)
|
|||
/* check we are using a driver managing SG_IO (version 3 and after */
|
||||
if (bdrv_ioctl(s->conf.bs, SG_GET_VERSION_NUM, &sg_version) < 0 ||
|
||||
sg_version < 30000) {
|
||||
error_report("scsi-generic: scsi generic interface too old");
|
||||
error_report("scsi generic interface too old");
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* get LUN of the /dev/sg? */
|
||||
if (bdrv_ioctl(s->conf.bs, SG_GET_SCSI_ID, &scsiid)) {
|
||||
error_report("scsi-generic: SG_GET_SCSI_ID ioctl failed");
|
||||
error_report("SG_GET_SCSI_ID ioctl failed");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
12
hw/usb-bus.c
12
hw/usb-bus.c
|
@ -137,7 +137,7 @@ USBDevice *usb_create(USBBus *bus, const char *name)
|
|||
bus = usb_bus_find(-1);
|
||||
if (!bus)
|
||||
return NULL;
|
||||
error_report("%s: no bus specified, using \"%s\" for \"%s\"\n",
|
||||
error_report("%s: no bus specified, using \"%s\" for \"%s\"",
|
||||
__FUNCTION__, bus->qbus.name, name);
|
||||
}
|
||||
#endif
|
||||
|
@ -152,12 +152,12 @@ USBDevice *usb_create_simple(USBBus *bus, const char *name)
|
|||
int rc;
|
||||
|
||||
if (!dev) {
|
||||
error_report("Failed to create USB device '%s'\n", name);
|
||||
error_report("Failed to create USB device '%s'", name);
|
||||
return NULL;
|
||||
}
|
||||
rc = qdev_init(&dev->qdev);
|
||||
if (rc < 0) {
|
||||
error_report("Failed to initialize USB device '%s'\n", name);
|
||||
error_report("Failed to initialize USB device '%s'", name);
|
||||
return NULL;
|
||||
}
|
||||
return dev;
|
||||
|
@ -244,7 +244,7 @@ int usb_claim_port(USBDevice *dev)
|
|||
}
|
||||
}
|
||||
if (port == NULL) {
|
||||
error_report("Error: usb port %s (bus %s) not found (in use?)\n",
|
||||
error_report("Error: usb port %s (bus %s) not found (in use?)",
|
||||
dev->port_path, bus->qbus.name);
|
||||
return -1;
|
||||
}
|
||||
|
@ -255,7 +255,7 @@ int usb_claim_port(USBDevice *dev)
|
|||
}
|
||||
if (bus->nfree == 0) {
|
||||
error_report("Error: tried to attach usb device %s to a bus "
|
||||
"with no free ports\n", dev->product_desc);
|
||||
"with no free ports", dev->product_desc);
|
||||
return -1;
|
||||
}
|
||||
port = QTAILQ_FIRST(&bus->free);
|
||||
|
@ -302,7 +302,7 @@ int usb_device_attach(USBDevice *dev)
|
|||
|
||||
if (!(port->speedmask & dev->speedmask)) {
|
||||
error_report("Warning: speed mismatch trying to attach "
|
||||
"usb device %s to bus %s\n",
|
||||
"usb device %s to bus %s",
|
||||
dev->product_desc, bus->qbus.name);
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -529,7 +529,7 @@ static int usb_msd_initfn(USBDevice *dev)
|
|||
DriveInfo *dinfo;
|
||||
|
||||
if (!bs) {
|
||||
error_report("usb-msd: drive property not set");
|
||||
error_report("drive property not set");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -569,7 +569,7 @@ VirtIODevice *virtio_blk_init(DeviceState *dev, BlockConf *conf,
|
|||
DriveInfo *dinfo;
|
||||
|
||||
if (!conf->bs) {
|
||||
error_report("virtio-blk-pci: drive property not set");
|
||||
error_report("drive property not set");
|
||||
return NULL;
|
||||
}
|
||||
if (!bdrv_is_inserted(conf->bs)) {
|
||||
|
|
|
@ -427,12 +427,14 @@ static int net_socket_listen_init(VLANState *vlan,
|
|||
if (ret < 0) {
|
||||
perror("bind");
|
||||
g_free(s);
|
||||
closesocket(fd);
|
||||
return -1;
|
||||
}
|
||||
ret = listen(fd, 0);
|
||||
if (ret < 0) {
|
||||
perror("listen");
|
||||
g_free(s);
|
||||
closesocket(fd);
|
||||
return -1;
|
||||
}
|
||||
s->vlan = vlan;
|
||||
|
|
10
qemu-nbd.c
10
qemu-nbd.c
|
@ -202,12 +202,10 @@ static void *nbd_client_thread(void *arg)
|
|||
int ret;
|
||||
pthread_t show_parts_thread;
|
||||
|
||||
do {
|
||||
sock = unix_socket_outgoing(sockpath);
|
||||
if (sock == -1) {
|
||||
goto out;
|
||||
}
|
||||
} while (sock == -1);
|
||||
sock = unix_socket_outgoing(sockpath);
|
||||
if (sock == -1) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = nbd_receive_negotiate(sock, NULL, &nbdflags,
|
||||
&size, &blocksize);
|
||||
|
|
|
@ -871,8 +871,8 @@ The x509 file names can also be configured individually.
|
|||
@item tls-ciphers=<list>
|
||||
Specify which ciphers to use.
|
||||
|
||||
@item tls-channel=[main|display|inputs|record|playback|tunnel]
|
||||
@item plaintext-channel=[main|display|inputs|record|playback|tunnel]
|
||||
@item tls-channel=[main|display|cursor|inputs|record|playback]
|
||||
@item plaintext-channel=[main|display|cursor|inputs|record|playback]
|
||||
Force specific channel to be used with or without TLS encryption. The
|
||||
options can be specified multiple times to configure multiple
|
||||
channels. The special name "default" can be used to set the default
|
||||
|
|
|
@ -174,7 +174,7 @@ static void usbredir_log(void *priv, int level, const char *msg)
|
|||
return;
|
||||
}
|
||||
|
||||
error_report("%s\n", msg);
|
||||
error_report("%s", msg);
|
||||
}
|
||||
|
||||
static void usbredir_log_data(USBRedirDevice *dev, const char *desc,
|
||||
|
@ -193,7 +193,7 @@ static void usbredir_log_data(USBRedirDevice *dev, const char *desc,
|
|||
for (j = 0; j < 8 && i + j < len; j++) {
|
||||
n += sprintf(buf + n, " %02X", data[i + j]);
|
||||
}
|
||||
error_report("%s\n", buf);
|
||||
error_report("%s", buf);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue