trivial patches for 2015-04-30

-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJVQikmAAoJEL7lnXSkw9fb4XUH/25cUpHNks1UUdwMBLAO/Et+
 KK9JE6c2o7HLsn6okPbNhWTbszRpFHC4cGFIozoYoSr780EjLgO/M73kzmSyGHqB
 jUgyLO0CgHFN1bBRpXj/E6hgmWrB1U6wTQsRFSzNDQ8f3xl/WqQAGnNg2jVtNIA5
 AWm4LWzorQldKEFenCRoINW7YqJfR5/x7ijTG6TYLmru67BJhpOrt4SuEa5dPVVy
 Tzl4Bc8P85hlRcB6N2aoyCLqtH2NSGXfilrAmNrzbzxV1fNze0gMkWG+eL69Ci44
 2RldU7O9oc55AuJyFhuLvsSygIie3f5c7XlX6t8Cnu3EpOZEDlX9gHBJ9wYDkAw=
 =vysd
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2015-04-30' into staging

trivial patches for 2015-04-30

# gpg: Signature made Thu Apr 30 14:07:50 2015 BST using RSA key ID A4C3D7DB
# gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>"
# gpg:                 aka "Michael Tokarev <mjt@corpit.ru>"
# gpg:                 aka "Michael Tokarev <mjt@debian.org>"

* remotes/mjt/tags/pull-trivial-patches-2015-04-30: (42 commits)
  openrisc: cpu: Remove unused cpu_get_pc
  microblaze: fix memory leak
  tcg: Delete unused cpu_pc_from_tb()
  kvm: Silence warning from valgrind
  vhost-user: remove superfluous '\n' around error_report()
  target-mips: fix memory leak
  qmp-commands: Fix typo
  linux-user/elfload: use QTAILQ_FOREACH instead of open-coding it
  coroutine: remove unnecessary parentheses in qemu_co_queue_empty
  qemu-char: remove unused list node from FDCharDriver
  input: remove unused mouse_handlers list
  cpus: use first_cpu macro instead of QTAILQ_FIRST(&cpus)
  microblaze: cpu: delete unused cpu_interrupts_enabled
  microblaze: cpu: Renumber EXCP_* constants to close gap
  microblaze: cpu: Delete EXCP_NMI
  microblaze: cpu: Remove unused CC_OP enum
  microblaze: cpu: Remote unused cpu_get_pc
  microblaze: mmu: Delete flip_um fn prototype
  defconfigs: Piggyback microblazeel on microblaze
  libcacard: do not use full paths for include files in the same dir
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2015-04-30 15:18:30 +01:00
commit f90f5b9a9a
67 changed files with 155 additions and 385 deletions

View File

@ -43,7 +43,7 @@ file_backend_memory_alloc(HostMemoryBackend *backend, Error **errp)
return;
}
if (!fb->mem_path) {
error_setg(errp, "mem_path property not set");
error_setg(errp, "mem-path property not set");
return;
}
#ifndef CONFIG_LINUX

4
configure vendored
View File

@ -5193,8 +5193,6 @@ case "$target_name" in
TARGET_BASE_ARCH=mips
echo "TARGET_ABI_MIPSN64=y" >> $config_target_mak
;;
tricore)
;;
moxie)
;;
or32)
@ -5245,6 +5243,8 @@ case "$target_name" in
s390x)
gdb_xml_files="s390x-core64.xml s390-acr.xml s390-fpr.xml"
;;
tricore)
;;
unicore32)
;;
xtensa|xtensaeb)

2
cpus.c
View File

@ -1016,7 +1016,7 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
qemu_cond_signal(&qemu_cpu_cond);
/* wait for initial kick-off after machine start */
while (QTAILQ_FIRST(&cpus)->stopped) {
while (first_cpu->stopped) {
qemu_cond_wait(tcg_halt_cond, &qemu_global_mutex);
/* process any pending work */

View File

@ -1,11 +1,3 @@
# Default configuration for microblazeel-softmmu
CONFIG_PTIMER=y
CONFIG_PFLASH_CFI01=y
CONFIG_SERIAL=y
CONFIG_XILINX=y
CONFIG_XILINX_AXI=y
CONFIG_XILINX_SPI=y
CONFIG_XILINX_ETHLITE=y
CONFIG_SSI=y
CONFIG_SSI_M25P80=y
include microblaze-softmmu.mak

View File

@ -10,7 +10,6 @@
#include "sysemu/block-backend.h"
#include "sysemu/dma.h"
#include "trace.h"
#include "qemu/range.h"
#include "qemu/thread.h"
#include "qemu/main-loop.h"

View File

@ -281,7 +281,7 @@ note that the other barrier may actually be in a driver that runs in
the guest!
For the purposes of pairing, smp_read_barrier_depends() and smp_rmb()
both count as read barriers. A read barriers shall pair with a write
both count as read barriers. A read barrier shall pair with a write
barrier or a full barrier; a write barrier shall pair with a read
barrier or a full barrier. A full barrier can pair with anything.
For example:
@ -294,7 +294,7 @@ For example:
smp_rmb();
y = a;
Note that the "writing" thread are accessing the variables in the
Note that the "writing" thread is accessing the variables in the
opposite order as the "reading" thread. This is expected: stores
before the write barrier will normally match the loads after the
read barrier, and vice versa. The same is true for more than 2

1
hmp.h
View File

@ -109,7 +109,6 @@ void set_link_completion(ReadLineState *rs, int nb_args, const char *str);
void netdev_add_completion(ReadLineState *rs, int nb_args, const char *str);
void netdev_del_completion(ReadLineState *rs, int nb_args, const char *str);
void ringbuf_write_completion(ReadLineState *rs, int nb_args, const char *str);
void ringbuf_read_completion(ReadLineState *rs, int nb_args, const char *str);
void watchdog_action_completion(ReadLineState *rs, int nb_args,
const char *str);
void migrate_set_capability_completion(ReadLineState *rs, int nb_args,

View File

@ -31,7 +31,6 @@
#include "hw/pci/pci.h"
#include "hw/acpi/acpi.h"
#include "sysemu/sysemu.h"
#include "qemu/range.h"
#include "exec/ioport.h"
#include "exec/address-spaces.h"
#include "hw/pci/pci_bus.h"

View File

@ -515,7 +515,7 @@ void virtio_blk_handle_request(VirtIOBlockReq *req, MultiReqBuffer *mrb)
type = virtio_ldl_p(VIRTIO_DEVICE(req->dev), &req->out.type);
/* VIRTIO_BLK_T_OUT defines the command direction. VIRTIO_BLK_T_BARRIER
* is an optional flag. Altough a guest should not send this flag if
* is an optional flag. Although a guest should not send this flag if
* not negotiated we ignored it in the past. So keep ignoring it. */
switch (type & ~(VIRTIO_BLK_T_OUT | VIRTIO_BLK_T_BARRIER)) {
case VIRTIO_BLK_T_IN:

View File

@ -696,7 +696,7 @@ static inline void qxl_push_free_res(PCIQXLDevice *d, int flush)
/* called from spice server thread context only */
static void interface_release_resource(QXLInstance *sin,
struct QXLReleaseInfoExt ext)
QXLReleaseInfoExt ext)
{
PCIQXLDevice *qxl = container_of(sin, PCIQXLDevice, ssd.qxl);
QXLReleaseRing *ring;

View File

@ -26,7 +26,6 @@
#include "qemu-common.h"
#include "qemu/bitmap.h"
#include "qemu/osdep.h"
#include "qemu/range.h"
#include "qemu/error-report.h"
#include "hw/pci/pci.h"
#include "qom/cpu.h"

View File

@ -113,15 +113,15 @@ void microblaze_load_kernel(MicroBlazeCPU *cpu, hwaddr ddr_base,
const char *kernel_filename;
const char *kernel_cmdline;
const char *dtb_arg;
char *filename = NULL;
machine_opts = qemu_get_machine_opts();
kernel_filename = qemu_opt_get(machine_opts, "kernel");
kernel_cmdline = qemu_opt_get(machine_opts, "append");
dtb_arg = qemu_opt_get(machine_opts, "dtb");
if (dtb_arg) { /* Preference a -dtb argument */
dtb_filename = dtb_arg;
} else { /* default to pcbios dtb as passed by machine_init */
dtb_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, dtb_filename);
/* default to pcbios dtb as passed by machine_init */
if (!dtb_arg) {
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, dtb_filename);
}
boot_info.machine_cpu_reset = machine_cpu_reset;
@ -203,7 +203,8 @@ void microblaze_load_kernel(MicroBlazeCPU *cpu, hwaddr ddr_base,
boot_info.initrd_start,
boot_info.initrd_end,
kernel_cmdline,
dtb_filename);
/* Preference a -dtb argument */
dtb_arg ? dtb_arg : filename);
}
g_free(filename);
}

View File

@ -168,6 +168,7 @@ static int64_t load_kernel (CPUMIPSState *env)
rom_add_blob_fixed("prom", prom_buf, prom_size,
cpu_mips_kseg0_to_phys(NULL, ENVP_ADDR));
g_free(prom_buf);
return kernel_entry;
}

View File

@ -861,6 +861,7 @@ static int64_t load_kernel (void)
rom_add_blob_fixed("prom", prom_buf, prom_size,
cpu_mips_kseg0_to_phys(NULL, ENVP_ADDR));
g_free(prom_buf);
return kernel_entry;
}

View File

@ -139,6 +139,7 @@ static int64_t load_kernel(void)
rom_add_blob_fixed("params", params_buf, params_size,
(16 << 20) - 264);
g_free(params_buf);
return entry;
}

View File

@ -279,7 +279,7 @@ static const MemoryRegionOps edu_mmio_ops = {
};
/*
* We purposedly use a thread, so that users are forced to wait for the status
* We purposely use a thread, so that users are forced to wait for the status
* register.
*/
static void *edu_fact_thread(void *opaque)

View File

@ -1590,7 +1590,7 @@ static void virtio_net_device_realize(DeviceState *dev, Error **errp)
n->max_queues = MAX(n->nic_conf.peers.queues, 1);
if (n->max_queues * 2 + 1 > VIRTIO_PCI_QUEUE_MAX) {
error_setg(errp, "Invalid number of queues (= %" PRIu32 "), "
"must be a postive integer less than %d.",
"must be a positive integer less than %d.",
n->max_queues, (VIRTIO_PCI_QUEUE_MAX - 1) / 2);
virtio_cleanup(vdev);
return;

View File

@ -172,13 +172,6 @@ bool vmxnet_rx_pkt_has_virt_hdr(struct VmxnetRxPkt *pkt)
return pkt->has_virt_hdr;
}
uint16_t vmxnet_rx_pkt_get_num_frags(struct VmxnetRxPkt *pkt)
{
assert(pkt);
return pkt->vec_len;
}
uint16_t vmxnet_rx_pkt_get_vlan_tag(struct VmxnetRxPkt *pkt)
{
assert(pkt);

View File

@ -113,15 +113,6 @@ bool vmxnet_rx_pkt_is_vlan_stripped(struct VmxnetRxPkt *pkt);
*/
bool vmxnet_rx_pkt_has_virt_hdr(struct VmxnetRxPkt *pkt);
/**
* returns number of frags attached to the packet
*
* @pkt: packet
* @ret: number of frags
*
*/
uint16_t vmxnet_rx_pkt_get_num_frags(struct VmxnetRxPkt *pkt);
/**
* attach data to rx packet
*

View File

@ -101,27 +101,6 @@ static const TypeInfo i82801b11_bridge_info = {
.class_init = i82801b11_bridge_class_init,
};
PCIBus *ich9_d2pbr_init(PCIBus *bus, int devfn, int sec_bus)
{
PCIDevice *d;
PCIBridge *br;
char buf[16];
DeviceState *qdev;
d = pci_create_multifunction(bus, devfn, true, "i82801b11-bridge");
if (!d) {
return NULL;
}
br = PCI_BRIDGE(d);
qdev = DEVICE(d);
snprintf(buf, sizeof(buf), "pci.%d", sec_bus);
pci_bridge_map_irq(br, buf, pci_swizzle_map_irq_fn);
qdev_init_nofail(qdev);
return pci_bridge_get_sec_bus(br);
}
static void d2pbr_register(void)
{
type_register_static(&i82801b11_bridge_info);

View File

@ -1029,7 +1029,7 @@ static int spapr_post_load(void *opaque, int version_id)
sPAPREnvironment *spapr = (sPAPREnvironment *)opaque;
int err = 0;
/* In earlier versions, there was no seperate qdev for the PAPR
/* In earlier versions, there was no separate qdev for the PAPR
* RTC, so the RTC offset was stored directly in sPAPREnvironment.
* So when migrating from those versions, poke the incoming offset
* value into the RTC device */

View File

@ -34,15 +34,13 @@
#include "sysemu/tpm_backend_int.h"
#include "tpm_tis.h"
/* #define DEBUG_TPM */
#define DEBUG_TPM 0
#ifdef DEBUG_TPM
#define DPRINTF(fmt, ...) \
do { fprintf(stderr, fmt, ## __VA_ARGS__); } while (0)
#else
#define DPRINTF(fmt, ...) \
do { } while (0)
#endif
#define DPRINTF(fmt, ...) do { \
if (DEBUG_TPM) { \
fprintf(stderr, fmt, ## __VA_ARGS__); \
} \
} while (0);
#define TYPE_TPM_PASSTHROUGH "tpm-passthrough"
#define TPM_PASSTHROUGH(obj) \

View File

@ -30,15 +30,13 @@
#include "qemu-common.h"
#include "qemu/main-loop.h"
/*#define DEBUG_TIS */
#define DEBUG_TIS 0
#ifdef DEBUG_TIS
#define DPRINTF(fmt, ...) \
do { fprintf(stderr, fmt, ## __VA_ARGS__); } while (0)
#else
#define DPRINTF(fmt, ...) \
do { } while (0)
#endif
#define DPRINTF(fmt, ...) do { \
if (DEBUG_TIS) { \
printf(fmt, ## __VA_ARGS__); \
} \
} while (0);
/* whether the STS interrupt is supported */
#define RAISE_STS_IRQ
@ -421,7 +419,7 @@ static void tpm_tis_dump_state(void *opaque, hwaddr addr)
for (idx = 0; regs[idx] != 0xfff; idx++) {
DPRINTF("tpm_tis: 0x%04x : 0x%08x\n", regs[idx],
(uint32_t)tpm_tis_mmio_read(opaque, base + regs[idx], 4));
(int)tpm_tis_mmio_read(opaque, base + regs[idx], 4));
}
DPRINTF("tpm_tis: read offset : %d\n"
@ -555,7 +553,7 @@ static uint64_t tpm_tis_mmio_read(void *opaque, hwaddr addr,
val >>= shift;
}
DPRINTF("tpm_tis: read.%u(%08x) = %08x\n", size, (int)addr, (uint32_t)val);
DPRINTF("tpm_tis: read.%u(%08x) = %08x\n", size, (int)addr, (int)val);
return val;
}
@ -578,7 +576,7 @@ static void tpm_tis_mmio_write_intern(void *opaque, hwaddr addr,
uint16_t len;
uint32_t mask = (size == 1) ? 0xff : ((size == 2) ? 0xffff : ~0);
DPRINTF("tpm_tis: write.%u(%08x) = %08x\n", size, (int)addr, (uint32_t)val);
DPRINTF("tpm_tis: write.%u(%08x) = %08x\n", size, (int)addr, (int)val);
if (locty == 4 && !hw_access) {
DPRINTF("tpm_tis: Access to locality 4 only allowed from hardware\n");
@ -815,7 +813,7 @@ static void tpm_tis_mmio_write_intern(void *opaque, hwaddr addr,
/* drop the byte */
} else {
DPRINTF("tpm_tis: Data to send to TPM: %08x (size=%d)\n",
val, size);
(int)val, size);
if (tis->loc[locty].state == TPM_TIS_STATE_READY) {
tis->loc[locty].state = TPM_TIS_STATE_RECEPTION;
tpm_tis_sts_set(&tis->loc[locty],
@ -844,7 +842,7 @@ static void tpm_tis_mmio_write_intern(void *opaque, hwaddr addr,
(tis->loc[locty].sts & TPM_TIS_STS_EXPECT)) {
/* we have a packet length - see if we have all of it */
#ifdef RAISE_STS_IRQ
bool needIrq = !(tis->loc[locty].sts & TPM_TIS_STS_VALID);
bool need_irq = !(tis->loc[locty].sts & TPM_TIS_STS_VALID);
#endif
len = tpm_tis_get_size_from_buffer(&tis->loc[locty].w_buffer);
if (len > tis->loc[locty].w_offset) {
@ -855,7 +853,7 @@ static void tpm_tis_mmio_write_intern(void *opaque, hwaddr addr,
tpm_tis_sts_set(&tis->loc[locty], TPM_TIS_STS_VALID);
}
#ifdef RAISE_STS_IRQ
if (needIrq) {
if (need_irq) {
tpm_tis_raise_irq(s, locty, TPM_TIS_INT_STS_VALID);
}
#endif

View File

@ -331,23 +331,6 @@ void usb_generic_async_ctrl_complete(USBDevice *s, USBPacket *p)
usb_packet_complete(s, p);
}
/* XXX: fix overflow */
int set_usb_string(uint8_t *buf, const char *str)
{
int len, i;
uint8_t *q;
q = buf;
len = strlen(str);
*q++ = 2 * len + 2;
*q++ = 3;
for(i = 0; i < len; i++) {
*q++ = str[i];
*q++ = 0;
}
return q - buf;
}
USBDevice *usb_find_device(USBPort *port, uint8_t addr)
{
USBDevice *dev = port->dev;
@ -749,12 +732,6 @@ void usb_ep_set_type(USBDevice *dev, int pid, int ep, uint8_t type)
uep->type = type;
}
uint8_t usb_ep_get_ifnum(USBDevice *dev, int pid, int ep)
{
struct USBEndpoint *uep = usb_ep_get(dev, pid, ep);
return uep->ifnum;
}
void usb_ep_set_ifnum(USBDevice *dev, int pid, int ep, uint8_t ifnum)
{
struct USBEndpoint *uep = usb_ep_get(dev, pid, ep);
@ -782,12 +759,6 @@ void usb_ep_set_max_packet_size(USBDevice *dev, int pid, int ep,
uep->max_packet_size = size * microframes;
}
int usb_ep_get_max_packet_size(USBDevice *dev, int pid, int ep)
{
struct USBEndpoint *uep = usb_ep_get(dev, pid, ep);
return uep->max_packet_size;
}
void usb_ep_set_max_streams(USBDevice *dev, int pid, int ep, uint8_t raw)
{
struct USBEndpoint *uep = usb_ep_get(dev, pid, ep);
@ -801,18 +772,6 @@ void usb_ep_set_max_streams(USBDevice *dev, int pid, int ep, uint8_t raw)
}
}
int usb_ep_get_max_streams(USBDevice *dev, int pid, int ep)
{
struct USBEndpoint *uep = usb_ep_get(dev, pid, ep);
return uep->max_streams;
}
void usb_ep_set_pipeline(USBDevice *dev, int pid, int ep, bool enabled)
{
struct USBEndpoint *uep = usb_ep_get(dev, pid, ep);
uep->pipeline = enabled;
}
void usb_ep_set_halted(USBDevice *dev, int pid, int ep, bool halted)
{
struct USBEndpoint *uep = usb_ep_get(dev, pid, ep);

View File

@ -128,7 +128,7 @@ static int vhost_user_read(struct vhost_dev *dev, VhostUserMsg *msg)
r = qemu_chr_fe_read_all(chr, p, size);
if (r != size) {
error_report("Failed to read msg header. Read %d instead of %d.\n", r,
error_report("Failed to read msg header. Read %d instead of %d.", r,
size);
goto fail;
}
@ -136,7 +136,7 @@ static int vhost_user_read(struct vhost_dev *dev, VhostUserMsg *msg)
/* validate received flags */
if (msg->flags != (VHOST_USER_REPLY_MASK | VHOST_USER_VERSION)) {
error_report("Failed to read msg header."
" Flags 0x%x instead of 0x%x.\n", msg->flags,
" Flags 0x%x instead of 0x%x.", msg->flags,
VHOST_USER_REPLY_MASK | VHOST_USER_VERSION);
goto fail;
}
@ -144,7 +144,7 @@ static int vhost_user_read(struct vhost_dev *dev, VhostUserMsg *msg)
/* validate message size is sane */
if (msg->size > VHOST_USER_PAYLOAD_SIZE) {
error_report("Failed to read msg header."
" Size %d exceeds the maximum %zu.\n", msg->size,
" Size %d exceeds the maximum %zu.", msg->size,
VHOST_USER_PAYLOAD_SIZE);
goto fail;
}
@ -155,7 +155,7 @@ static int vhost_user_read(struct vhost_dev *dev, VhostUserMsg *msg)
r = qemu_chr_fe_read_all(chr, p, size);
if (r != size) {
error_report("Failed to read msg payload."
" Read %d instead of %d.\n", r, msg->size);
" Read %d instead of %d.", r, msg->size);
goto fail;
}
}
@ -235,8 +235,8 @@ static int vhost_user_call(struct vhost_dev *dev, unsigned long int request,
msg.memory.nregions = fd_num;
if (!fd_num) {
error_report("Failed initializing vhost-user memory map\n"
"consider using -object memory-backend-file share=on\n");
error_report("Failed initializing vhost-user memory map, "
"consider using -object memory-backend-file share=on");
return -1;
}
@ -280,7 +280,7 @@ static int vhost_user_call(struct vhost_dev *dev, unsigned long int request,
}
break;
default:
error_report("vhost-user trying to send unhandled ioctl\n");
error_report("vhost-user trying to send unhandled ioctl");
return -1;
break;
}
@ -296,27 +296,27 @@ static int vhost_user_call(struct vhost_dev *dev, unsigned long int request,
if (msg_request != msg.request) {
error_report("Received unexpected msg type."
" Expected %d received %d\n", msg_request, msg.request);
" Expected %d received %d", msg_request, msg.request);
return -1;
}
switch (msg_request) {
case VHOST_USER_GET_FEATURES:
if (msg.size != sizeof(m.u64)) {
error_report("Received bad msg size.\n");
error_report("Received bad msg size.");
return -1;
}
*((__u64 *) arg) = msg.u64;
break;
case VHOST_USER_GET_VRING_BASE:
if (msg.size != sizeof(m.state)) {
error_report("Received bad msg size.\n");
error_report("Received bad msg size.");
return -1;
}
memcpy(arg, &msg.state, sizeof(struct vhost_vring_state));
break;
default:
error_report("Received unexpected msg type.\n");
error_report("Received unexpected msg type.");
return -1;
break;
}

View File

@ -2,7 +2,6 @@
#define HW_ICH9_H
#include "hw/hw.h"
#include "qemu/range.h"
#include "hw/isa/isa.h"
#include "hw/sysbus.h"
#include "hw/i386/pc.h"
@ -19,7 +18,6 @@ void ich9_lpc_set_irq(void *opaque, int irq_num, int level);
int ich9_lpc_map_irq(PCIDevice *pci_dev, int intx);
PCIINTxRoute ich9_route_intx_pin_to_irq(void *opaque, int pirq_pin);
void ich9_lpc_pm_init(PCIDevice *pci_lpc);
PCIBus *ich9_d2pbr_init(PCIBus *bus, int devfn, int sec_bus);
I2CBus *ich9_smb_init(PCIBus *bus, int devfn, uint32_t smb_io_base);
#define ICH9_CC_SIZE (16 * 1024) /* 16KB */

View File

@ -23,7 +23,6 @@
#define HW_Q35_H
#include "hw/hw.h"
#include "qemu/range.h"
#include "hw/isa/isa.h"
#include "hw/sysbus.h"
#include "hw/i386/pc.h"

View File

@ -445,15 +445,11 @@ void usb_ep_reset(USBDevice *dev);
void usb_ep_dump(USBDevice *dev);
struct USBEndpoint *usb_ep_get(USBDevice *dev, int pid, int ep);
uint8_t usb_ep_get_type(USBDevice *dev, int pid, int ep);
uint8_t usb_ep_get_ifnum(USBDevice *dev, int pid, int ep);
void usb_ep_set_type(USBDevice *dev, int pid, int ep, uint8_t type);
void usb_ep_set_ifnum(USBDevice *dev, int pid, int ep, uint8_t ifnum);
void usb_ep_set_max_packet_size(USBDevice *dev, int pid, int ep,
uint16_t raw);
int usb_ep_get_max_packet_size(USBDevice *dev, int pid, int ep);
void usb_ep_set_max_streams(USBDevice *dev, int pid, int ep, uint8_t raw);
int usb_ep_get_max_streams(USBDevice *dev, int pid, int ep);
void usb_ep_set_pipeline(USBDevice *dev, int pid, int ep, bool enabled);
void usb_ep_set_halted(USBDevice *dev, int pid, int ep, bool halted);
USBPacket *usb_ep_find_packet_by_id(USBDevice *dev, int pid, int ep,
uint64_t id);
@ -469,7 +465,6 @@ void usb_port_reset(USBPort *port);
void usb_device_reset(USBDevice *dev);
void usb_wakeup(USBEndpoint *ep, unsigned int stream);
void usb_generic_async_ctrl_complete(USBDevice *s, USBPacket *p);
int set_usb_string(uint8_t *buf, const char *str);
/* usb-linux.c */
USBDevice *usb_host_device_open(USBBus *bus, const char *devname);

View File

@ -47,7 +47,6 @@ typedef void (MonitorCompletion)(void *opaque, QObject *ret_data);
void monitor_set_error(Monitor *mon, QError *qerror);
void monitor_read_command(Monitor *mon, int show_prompt);
ReadLineState *monitor_get_rs(Monitor *mon);
int monitor_read_password(Monitor *mon, ReadLineFunc *readline_func,
void *opaque);

View File

@ -217,10 +217,6 @@ void *qemu_oom_check(void *ptr);
ssize_t qemu_write_full(int fd, const void *buf, size_t count)
QEMU_WARN_UNUSED_RESULT;
ssize_t qemu_send_full(int fd, const void *buf, size_t count, int flags)
QEMU_WARN_UNUSED_RESULT;
ssize_t qemu_recv_full(int fd, void *buf, size_t count, int flags)
QEMU_WARN_UNUSED_RESULT;
#ifndef _WIN32
int qemu_pipe(int pipefd[2]);

View File

@ -20,10 +20,10 @@
#define BITS_PER_BYTE CHAR_BIT
#define BITS_PER_LONG (sizeof (unsigned long) * BITS_PER_BYTE)
#define BIT(nr) (1UL << (nr))
#define BIT_MASK(nr) (1UL << ((nr) % BITS_PER_LONG))
#define BIT_WORD(nr) ((nr) / BITS_PER_LONG)
#define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long))
#define BIT(nr) (1UL << (nr))
#define BIT_MASK(nr) (1UL << ((nr) % BITS_PER_LONG))
#define BIT_WORD(nr) ((nr) / BITS_PER_LONG)
#define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long))
/**
* set_bit - Set a bit in memory
@ -32,10 +32,10 @@
*/
static inline void set_bit(long nr, unsigned long *addr)
{
unsigned long mask = BIT_MASK(nr);
unsigned long *p = addr + BIT_WORD(nr);
unsigned long mask = BIT_MASK(nr);
unsigned long *p = addr + BIT_WORD(nr);
*p |= mask;
*p |= mask;
}
/**
@ -45,10 +45,10 @@ static inline void set_bit(long nr, unsigned long *addr)
*/
static inline void clear_bit(long nr, unsigned long *addr)
{
unsigned long mask = BIT_MASK(nr);
unsigned long *p = addr + BIT_WORD(nr);
unsigned long mask = BIT_MASK(nr);
unsigned long *p = addr + BIT_WORD(nr);
*p &= ~mask;
*p &= ~mask;
}
/**
@ -58,10 +58,10 @@ static inline void clear_bit(long nr, unsigned long *addr)
*/
static inline void change_bit(long nr, unsigned long *addr)
{
unsigned long mask = BIT_MASK(nr);
unsigned long *p = addr + BIT_WORD(nr);
unsigned long mask = BIT_MASK(nr);
unsigned long *p = addr + BIT_WORD(nr);
*p ^= mask;
*p ^= mask;
}
/**
@ -71,12 +71,12 @@ static inline void change_bit(long nr, unsigned long *addr)
*/
static inline int test_and_set_bit(long nr, unsigned long *addr)
{
unsigned long mask = BIT_MASK(nr);
unsigned long *p = addr + BIT_WORD(nr);
unsigned long old = *p;
unsigned long mask = BIT_MASK(nr);
unsigned long *p = addr + BIT_WORD(nr);
unsigned long old = *p;
*p = old | mask;
return (old & mask) != 0;
*p = old | mask;
return (old & mask) != 0;
}
/**
@ -86,12 +86,12 @@ static inline int test_and_set_bit(long nr, unsigned long *addr)
*/
static inline int test_and_clear_bit(long nr, unsigned long *addr)
{
unsigned long mask = BIT_MASK(nr);
unsigned long *p = addr + BIT_WORD(nr);
unsigned long old = *p;
unsigned long mask = BIT_MASK(nr);
unsigned long *p = addr + BIT_WORD(nr);
unsigned long old = *p;
*p = old & ~mask;
return (old & mask) != 0;
*p = old & ~mask;
return (old & mask) != 0;
}
/**
@ -101,12 +101,12 @@ static inline int test_and_clear_bit(long nr, unsigned long *addr)
*/
static inline int test_and_change_bit(long nr, unsigned long *addr)
{
unsigned long mask = BIT_MASK(nr);
unsigned long *p = addr + BIT_WORD(nr);
unsigned long old = *p;
unsigned long mask = BIT_MASK(nr);
unsigned long *p = addr + BIT_WORD(nr);
unsigned long old = *p;
*p = old ^ mask;
return (old & mask) != 0;
*p = old ^ mask;
return (old & mask) != 0;
}
/**
@ -116,7 +116,7 @@ static inline int test_and_change_bit(long nr, unsigned long *addr)
*/
static inline int test_bit(long nr, const unsigned long *addr)
{
return 1UL & (addr[BIT_WORD(nr)] >> (nr & (BITS_PER_LONG-1)));
return 1UL & (addr[BIT_WORD(nr)] >> (nr & (BITS_PER_LONG-1)));
}
/**
@ -136,7 +136,8 @@ unsigned long find_last_bit(const unsigned long *addr,
* @size: The bitmap size in bits
*/
unsigned long find_next_bit(const unsigned long *addr,
unsigned long size, unsigned long offset);
unsigned long size,
unsigned long offset);
/**
* find_next_zero_bit - find the next cleared bit in a memory region

View File

@ -39,6 +39,5 @@ struct qemu_signalfd_siginfo {
};
int qemu_signalfd(const sigset_t *mask);
bool qemu_signalfd_available(void);
#endif

View File

@ -552,13 +552,13 @@ static int kvm_set_ioeventfd_mmio(int fd, hwaddr addr, uint32_t val,
bool assign, uint32_t size, bool datamatch)
{
int ret;
struct kvm_ioeventfd iofd;
iofd.datamatch = datamatch ? adjust_ioeventfd_endianness(val, size) : 0;
iofd.addr = addr;
iofd.len = size;
iofd.flags = 0;
iofd.fd = fd;
struct kvm_ioeventfd iofd = {
.datamatch = datamatch ? adjust_ioeventfd_endianness(val, size) : 0,
.addr = addr,
.len = size,
.flags = 0,
.fd = fd,
};
if (!kvm_enabled()) {
return -ENOSYS;

View File

@ -5,7 +5,10 @@
* See the COPYING.LIB file in the top-level directory.
*/
#include "qemu-common.h"
#include "glib-compat.h"
#include <string.h>
#include <stdbool.h>
#include "cac.h"
#include "vcard.h"

View File

@ -5,7 +5,9 @@
* See the COPYING.LIB file in the top-level directory.
*/
#include "qemu-common.h"
#include "glib-compat.h"
#include <string.h>
#include "vcard.h"
#include "vcard_emul.h"

View File

@ -5,7 +5,7 @@
* See the COPYING.LIB file in the top-level directory.
*/
#include "qemu-common.h"
#include "glib-compat.h"
#include "vcard.h"
#include "vreader.h"

View File

@ -5,7 +5,9 @@
* See the COPYING.LIB file in the top-level directory.
*/
#include "qemu-common.h"
#include "glib-compat.h"
#include <string.h>
#include "vcard.h"
#include "vcard_emul.h"

View File

@ -25,7 +25,7 @@
#include <prthread.h>
#include <secerr.h>
#include "qemu-common.h"
#include "glib-compat.h"
#include "vcard.h"
#include "card_7816t.h"
@ -33,7 +33,7 @@
#include "vreader.h"
#include "vevent.h"
#include "libcacard/vcardt_internal.h"
#include "vcardt_internal.h"
typedef enum {

View File

@ -2,9 +2,9 @@
#include <string.h>
#include <glib.h>
#include "libcacard/vcardt.h"
#include "vcardt.h"
#include "libcacard/vcardt_internal.h"
#include "vcardt_internal.h"
/* create an ATR with appropriate historical bytes */
#define ATR_TS_DIRECT_CONVENTION 0x3b

View File

@ -10,7 +10,9 @@
#endif
#define G_LOG_DOMAIN "libcacard"
#include "qemu-common.h"
#include "glib-compat.h"
#include <string.h>
#include "vcard.h"
#include "vcard_emul.h"

View File

@ -10,14 +10,20 @@
* See the COPYING.LIB file in the top-level directory.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifndef _WIN32
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <unistd.h>
#define closesocket(x) close(x)
#else
#include <getopt.h>
#endif
#include "qemu-common.h"
#include "glib-compat.h"
#include "vscard_common.h"

View File

@ -2887,8 +2887,7 @@ static int write_note_info(struct elf_note_info *info, int fd)
return (error);
/* write prstatus for each thread */
for (ets = info->thread_list.tqh_first; ets != NULL;
ets = ets->ets_link.tqe_next) {
QTAILQ_FOREACH(ets, &info->thread_list, ets_link) {
if ((error = write_note(&ets->notes[0], fd)) != 0)
return (error);
}

View File

@ -4390,14 +4390,6 @@ static void ringbuf_completion(ReadLineState *rs, const char *str)
qapi_free_ChardevInfoList(start);
}
void ringbuf_read_completion(ReadLineState *rs, int nb_args, const char *str)
{
if (nb_args != 2) {
return;
}
ringbuf_completion(rs, str);
}
void ringbuf_write_completion(ReadLineState *rs, int nb_args, const char *str)
{
if (nb_args != 2) {
@ -5392,11 +5384,6 @@ static void bdrv_password_cb(void *opaque, const char *password,
monitor_read_command(mon, 1);
}
ReadLineState *monitor_get_rs(Monitor *mon)
{
return mon->rs;
}
int monitor_read_bdrv_key_start(Monitor *mon, BlockDriverState *bs,
BlockCompletionFunc *completion_cb,
void *opaque)

View File

@ -973,7 +973,6 @@ typedef struct FDCharDriver {
CharDriverState *chr;
GIOChannel *fd_in, *fd_out;
int max_size;
QTAILQ_ENTRY(FDCharDriver) node;
} FDCharDriver;
/* Called with chr_write_lock held. */

View File

@ -108,7 +108,7 @@ bool qemu_co_enter_next(CoQueue *queue)
bool qemu_co_queue_empty(CoQueue *queue)
{
return (QTAILQ_FIRST(&queue->entries) == NULL);
return QTAILQ_FIRST(&queue->entries) == NULL;
}
void qemu_co_mutex_init(CoMutex *mutex)

View File

@ -3106,7 +3106,7 @@ executed often has little or no correlation with actual performance.
to synchronise the host clock and the virtual clock. The goal is to
have a guest running at the real frequency imposed by the shift option.
Whenever the guest clock is behind the host clock and if
@option{align=on} is specified then we print a messsage to the user
@option{align=on} is specified then we print a message to the user
to inform about the delay.
Currently this option does not work when @option{shift} is @code{auto}.
Note: The sync algorithm will work for those shift values for which

View File

@ -808,7 +808,7 @@
#
# An enumeration of memory block operation result.
#
# @sucess: the operation of online/offline memory block is successful.
# @success: the operation of online/offline memory block is successful.
# @not-found: can't find the corresponding memoryXXX directory in sysfs.
# @operation-not-supported: for some old kernels, it does not support
# online or offline memory block.

View File

@ -2380,7 +2380,7 @@ Example:
"virtual-size":2048000,
"backing_file":"base.qcow2",
"full-backing-filename":"disks/base.qcow2",
"backing-filename-format:"qcow2",
"backing-filename-format":"qcow2",
"snapshots":[
{
"id": "1",
@ -3847,7 +3847,7 @@ Example:
"virtual-size":2048000,
"backing_file":"base.qcow2",
"full-backing-filename":"disks/base.qcow2",
"backing-filename-format:"qcow2",
"backing-filename-format":"qcow2",
"snapshots":[
{
"id": "1",

View File

@ -93,11 +93,6 @@
#define ARM_CPU_VIRQ 2
#define ARM_CPU_VFIQ 3
typedef void ARMWriteCPFunc(void *opaque, int cp_info,
int srcreg, int operand, uint32_t value);
typedef uint32_t ARMReadCPFunc(void *opaque, int cp_info,
int dstreg, int operand);
struct arm_boot_info;
#define NB_MMU_MODES 7
@ -1879,15 +1874,6 @@ static inline void cpu_get_tb_cpu_state(CPUARMState *env, target_ulong *pc,
#include "exec/exec-all.h"
static inline void cpu_pc_from_tb(CPUARMState *env, TranslationBlock *tb)
{
if (ARM_TBFLAG_AARCH64_STATE(tb->flags)) {
env->pc = tb->pc;
} else {
env->regs[15] = tb->pc;
}
}
enum {
QEMU_PSCI_CONDUIT_DISABLED = 0,
QEMU_PSCI_CONDUIT_SMC = 1,

View File

@ -36,12 +36,11 @@ typedef struct CPUMBState CPUMBState;
#define ELF_MACHINE EM_MICROBLAZE
#define EXCP_NMI 1
#define EXCP_MMU 2
#define EXCP_IRQ 3
#define EXCP_BREAK 4
#define EXCP_HW_BREAK 5
#define EXCP_HW_EXCP 6
#define EXCP_MMU 1
#define EXCP_IRQ 2
#define EXCP_BREAK 3
#define EXCP_HW_BREAK 4
#define EXCP_HW_EXCP 5
/* MicroBlaze-specific interrupt pending bits. */
#define CPU_INTERRUPT_NMI CPU_INTERRUPT_TGT_EXT_3
@ -284,12 +283,6 @@ int cpu_mb_exec(CPUMBState *s);
int cpu_mb_signal_handler(int host_signum, void *pinfo,
void *puc);
enum {
CC_OP_DYNAMIC, /* Use env->cc_op */
CC_OP_FLAGS,
CC_OP_CMP,
};
/* FIXME: MB uses variable pages down to 1K but linux only uses 4k. */
#define TARGET_PAGE_BITS 12
#define MMAP_SHIFT TARGET_PAGE_BITS
@ -326,18 +319,8 @@ static inline int cpu_mmu_index (CPUMBState *env)
int mb_cpu_handle_mmu_fault(CPUState *cpu, vaddr address, int rw,
int mmu_idx);
static inline int cpu_interrupts_enabled(CPUMBState *env)
{
return env->sregs[SR_MSR] & MSR_IE;
}
#include "exec/cpu-all.h"
static inline target_ulong cpu_get_pc(CPUMBState *env)
{
return env->sregs[SR_PC];
}
static inline void cpu_get_tb_cpu_state(CPUMBState *env, target_ulong *pc,
target_ulong *cs_base, int *flags)
{

View File

@ -82,7 +82,6 @@ struct microblaze_mmu_lookup
} err;
};
void mmu_flip_um(CPUMBState *env, unsigned int um);
unsigned int mmu_translate(struct microblaze_mmu *mmu,
struct microblaze_mmu_lookup *lu,
target_ulong vaddr, int rw, int mmu_idx);

View File

@ -415,9 +415,4 @@ static inline int cpu_mmu_index(CPUOpenRISCState *env)
#include "exec/exec-all.h"
static inline target_ulong cpu_get_pc(CPUOpenRISCState *env)
{
return env->pc;
}
#endif /* CPU_OPENRISC_H */

View File

@ -303,8 +303,8 @@ static int mmu_translate_asce(CPUS390XState *env, target_ulong vaddr,
* @param asc address space control (one of the PSW_ASC_* modes)
* @param raddr the translated address is stored to this pointer
* @param flags the PAGE_READ/WRITE/EXEC flags are stored to this pointer
* @param exc true = inject a program check if a fault occured
* @return 0 if the translation was successfull, -1 if a fault occured
* @param exc true = inject a program check if a fault occurred
* @return 0 if the translation was successful, -1 if a fault occurred
*/
int mmu_translate(CPUS390XState *env, target_ulong vaddr, int rw, uint64_t asc,
target_ulong *raddr, int *flags, bool exc)
@ -437,9 +437,9 @@ static int translate_pages(S390CPU *cpu, vaddr addr, int nr_pages,
* @laddr: the logical start address
* @ar: the access register number
* @hostbuf: buffer in host memory. NULL = do only checks w/o copying
* @len: length that should be transfered
* @len: length that should be transferred
* @is_write: true = write, false = read
* Returns: 0 on success, non-zero if an exception occured
* Returns: 0 on success, non-zero if an exception occurred
*
* Copy from/to guest memory using logical addresses. Note that we inject a
* program interrupt in case there is an error while accessing the memory.

View File

@ -2990,7 +2990,7 @@ static ExitStatus op_sam(DisasContext *s, DisasOps *o)
break;
}
/* Bizzare but true, we check the address of the current insn for the
/* Bizarre but true, we check the address of the current insn for the
specification exception, not the next to be executed. Thus the PoO
documents that Bad Things Happen two bytes before the end. */
if (s->pc & ~mask) {

View File

@ -395,9 +395,4 @@ int cpu_tricore_handle_mmu_fault(CPUState *cpu, target_ulong address,
#include "exec/exec-all.h"
static inline void cpu_pc_from_tb(CPUTriCoreState *env, TranslationBlock *tb)
{
env->PC = tb->pc;
}
#endif /*__TRICORE_CPU_H__ */

View File

@ -859,8 +859,10 @@ static inline size_t tcg_current_code_size(TCGContext *s)
* state is correctly synchronised and ready for execution of the next
* TB (and in particular the guest PC is the address to execute next).
* Otherwise, we gave up on execution of this TB before it started, and
* the caller must fix up the CPU state by calling cpu_pc_from_tb()
* with the next-TB pointer we return.
* the caller must fix up the CPU state by calling the CPU's
* synchronize_from_tb() method with the next-TB pointer we return (falling
* back to calling the CPU's set_pc method with tb->pb if no
* synchronize_from_tb() method exists).
*
* Note that TCG targets may use a different definition of tcg_qemu_tb_exec
* to this default (which just calls the prologue.code emitted by

View File

@ -364,7 +364,7 @@ void ahci_port_clear(AHCIQState *ahci, uint8_t port)
ahci_px_wreg(ahci, port, AHCI_PX_IS, reg);
g_assert_cmphex(ahci_px_rreg(ahci, port, AHCI_PX_IS), ==, 0);
/* Wipe the FIS-Recieve Buffer */
/* Wipe the FIS-Receive Buffer */
qmemset(ahci->port[port].fb, 0x00, 0x100);
}
@ -442,7 +442,7 @@ void ahci_port_check_pio_sanity(AHCIQState *ahci, uint8_t port,
{
PIOSetupFIS *pio = g_malloc0(0x20);
/* We cannot check the Status or E_Status registers, becuase
/* We cannot check the Status or E_Status registers, because
* the status may have again changed between the PIO Setup FIS
* and the conclusion of the command with the D2H Register FIS. */
memread(ahci->port[port].fb + 0x20, pio, 0x20);

View File

@ -269,7 +269,7 @@ void graphic_hw_invalidate(QemuConsole *con)
}
}
static void ppm_save(const char *filename, struct DisplaySurface *ds,
static void ppm_save(const char *filename, DisplaySurface *ds,
Error **errp)
{
int width = pixman_image_get_width(ds->image);
@ -1535,7 +1535,7 @@ void dpy_text_update(QemuConsole *con, int x, int y, int w, int h)
void dpy_text_resize(QemuConsole *con, int w, int h)
{
DisplayState *s = con->ds;
struct DisplayChangeListener *dcl;
DisplayChangeListener *dcl;
if (!qemu_console_is_visible(con)) {
return;

View File

@ -57,8 +57,6 @@ struct QEMUPutLEDEntry {
static QTAILQ_HEAD(, QEMUPutLEDEntry) led_handlers =
QTAILQ_HEAD_INITIALIZER(led_handlers);
static QTAILQ_HEAD(, QEMUPutMouseEntry) mouse_handlers =
QTAILQ_HEAD_INITIALIZER(mouse_handlers);
int index_from_key(const char *key)
{

View File

@ -539,7 +539,7 @@ static void interface_get_init_info(QXLInstance *sin, QXLDevInitInfo *info)
info->n_surfaces = ssd->num_surfaces;
}
static int interface_get_command(QXLInstance *sin, struct QXLCommandExt *ext)
static int interface_get_command(QXLInstance *sin, QXLCommandExt *ext)
{
SimpleSpiceDisplay *ssd = container_of(sin, SimpleSpiceDisplay, qxl);
SimpleSpiceUpdate *update;
@ -566,7 +566,7 @@ static int interface_req_cmd_notification(QXLInstance *sin)
}
static void interface_release_resource(QXLInstance *sin,
struct QXLReleaseInfoExt rext)
QXLReleaseInfoExt rext)
{
SimpleSpiceDisplay *ssd = container_of(sin, SimpleSpiceDisplay, qxl);
SimpleSpiceUpdate *update;
@ -589,7 +589,7 @@ static void interface_release_resource(QXLInstance *sin,
}
}
static int interface_get_cursor_command(QXLInstance *sin, struct QXLCommandExt *ext)
static int interface_get_cursor_command(QXLInstance *sin, QXLCommandExt *ext)
{
SimpleSpiceDisplay *ssd = container_of(sin, SimpleSpiceDisplay, qxl);
int ret;
@ -718,7 +718,7 @@ static void display_update(DisplayChangeListener *dcl,
}
static void display_switch(DisplayChangeListener *dcl,
struct DisplaySurface *surface)
DisplaySurface *surface)
{
SimpleSpiceDisplay *ssd = container_of(dcl, SimpleSpiceDisplay, dcl);
qemu_spice_display_switch(ssd, surface);

View File

@ -65,7 +65,8 @@ static void start_auth_vencrypt_subauth(VncState *vs)
static void vnc_tls_handshake_io(void *opaque);
static int vnc_start_vencrypt_handshake(struct VncState *vs) {
static int vnc_start_vencrypt_handshake(VncState *vs)
{
int ret;
if ((ret = gnutls_handshake(vs->tls.session)) < 0) {
@ -100,8 +101,9 @@ static int vnc_start_vencrypt_handshake(struct VncState *vs) {
return 0;
}
static void vnc_tls_handshake_io(void *opaque) {
struct VncState *vs = (struct VncState *)opaque;
static void vnc_tls_handshake_io(void *opaque)
{
VncState *vs = (VncState *)opaque;
VNC_DEBUG("Handshake IO continue\n");
vnc_start_vencrypt_handshake(vs);

View File

@ -68,7 +68,7 @@ static int vnc_tls_initialize(void)
static ssize_t vnc_tls_push(gnutls_transport_ptr_t transport,
const void *data,
size_t len) {
struct VncState *vs = (struct VncState *)transport;
VncState *vs = (VncState *)transport;
int ret;
retry:
@ -85,7 +85,7 @@ static ssize_t vnc_tls_push(gnutls_transport_ptr_t transport,
static ssize_t vnc_tls_pull(gnutls_transport_ptr_t transport,
void *data,
size_t len) {
struct VncState *vs = (struct VncState *)transport;
VncState *vs = (VncState *)transport;
int ret;
retry:
@ -170,7 +170,7 @@ static gnutls_certificate_credentials_t vnc_tls_initialize_x509_cred(VncDisplay
}
int vnc_tls_validate_certificate(struct VncState *vs)
int vnc_tls_validate_certificate(VncState *vs)
{
int ret;
unsigned int status;
@ -332,7 +332,7 @@ static int vnc_set_gnutls_priority(gnutls_session_t s, int x509)
#endif
int vnc_tls_client_setup(struct VncState *vs,
int vnc_tls_client_setup(VncState *vs,
int needX509Creds) {
VNC_DEBUG("Do TLS setup\n");
if (vnc_tls_initialize() < 0) {
@ -410,7 +410,7 @@ int vnc_tls_client_setup(struct VncState *vs,
}
void vnc_tls_client_cleanup(struct VncState *vs)
void vnc_tls_client_cleanup(VncState *vs)
{
if (vs->tls.session) {
gnutls_deinit(vs->tls.session);

View File

@ -24,7 +24,7 @@
#ifdef CONFIG_VNC_TLS
#include "qemu/sockets.h"
static int vncws_start_tls_handshake(struct VncState *vs)
static int vncws_start_tls_handshake(VncState *vs)
{
int ret = gnutls_handshake(vs->tls.session);
@ -63,7 +63,7 @@ static int vncws_start_tls_handshake(struct VncState *vs)
void vncws_tls_handshake_io(void *opaque)
{
struct VncState *vs = (struct VncState *)opaque;
VncState *vs = (VncState *)opaque;
if (!vs->tls.session) {
VNC_DEBUG("TLS Websocket setup\n");

View File

@ -1046,7 +1046,7 @@ static void vnc_dpy_cursor_define(DisplayChangeListener *dcl,
}
}
static int find_and_clear_dirty_height(struct VncState *vs,
static int find_and_clear_dirty_height(VncState *vs,
int y, int last_x, int x, int height)
{
int h;

View File

@ -108,22 +108,3 @@ int qemu_signalfd(const sigset_t *mask)
return qemu_signalfd_compat(mask);
}
bool qemu_signalfd_available(void)
{
#ifdef CONFIG_SIGNALFD
sigset_t mask;
int fd;
bool ok;
sigemptyset(&mask);
errno = 0;
fd = syscall(SYS_signalfd, -1, &mask, _NSIG / 8);
ok = (errno != ENOSYS);
if (fd >= 0) {
close(fd);
}
return ok;
#else
return false;
#endif
}

View File

@ -310,72 +310,6 @@ int qemu_accept(int s, struct sockaddr *addr, socklen_t *addrlen)
return ret;
}
/*
* A variant of send(2) which handles partial write.
*
* Return the number of bytes transferred, which is only
* smaller than `count' if there is an error.
*
* This function won't work with non-blocking fd's.
* Any of the possibilities with non-bloking fd's is bad:
* - return a short write (then name is wrong)
* - busy wait adding (errno == EAGAIN) to the loop
*/
ssize_t qemu_send_full(int fd, const void *buf, size_t count, int flags)
{
ssize_t ret = 0;
ssize_t total = 0;
while (count) {
ret = send(fd, buf, count, flags);
if (ret < 0) {
if (errno == EINTR) {
continue;
}
break;
}
count -= ret;
buf += ret;
total += ret;
}
return total;
}
/*
* A variant of recv(2) which handles partial write.
*
* Return the number of bytes transferred, which is only
* smaller than `count' if there is an error.
*
* This function won't work with non-blocking fd's.
* Any of the possibilities with non-bloking fd's is bad:
* - return a short write (then name is wrong)
* - busy wait adding (errno == EAGAIN) to the loop
*/
ssize_t qemu_recv_full(int fd, void *buf, size_t count, int flags)
{
ssize_t ret = 0;
ssize_t total = 0;
while (count) {
ret = qemu_recv(fd, buf, count, flags);
if (ret <= 0) {
if (ret < 0 && errno == EINTR) {
continue;
}
break;
}
count -= ret;
buf += ret;
total += ret;
}
return total;
}
void qemu_set_version(const char *version)
{
qemu_version = version;

View File

@ -3,10 +3,8 @@
#include "qemu/option.h"
#include "qemu/config-file.h"
#include "qapi/qmp/qerror.h"
#include "hw/qdev.h"
#include "qapi/error.h"
#include "qmp-commands.h"
#include "hw/i386/pc.h"
static QemuOptsList *vm_config_groups[32];
static QemuOptsList *drive_config_groups[4];