Merge remote-tracking branch 'stefanha/trivial-patches' into staging

* stefanha/trivial-patches:
  pc_sysfw: Plug memory leak on pc_fw_add_pflash_drv() error path
  qemu-options: Fix space at EOL
  Fix spelling in comments and documentation
  Clean up pci_drive_hot_add()'s use of BlockInterfaceType
  arm: a9mpcore: remove un-used ptimer_iomem field
  target-sparc: Remove t0, t1 from CPUSPARCState
  target-m68k: Remove t1 from CPUM68KState
  target-alpha: Remove t0, t1 from CPUAlphaState
  s390x: Spelling fixes (endianess -> endianness, occured -> occurred)
  Fix comments (adress -> address, layed -> laid, wierd -> weird)
  Fix spelling (prefered -> preferred)
  configure: Remove stray debug output
  sd: Send debug printfery to stderr not stdout

Conflicts:
	configure

Resolve spelling conflict in configure.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Anthony Liguori 2012-12-10 08:34:29 -06:00
commit 7c12fd9b29
19 changed files with 32 additions and 48 deletions

4
configure vendored
View File

@ -2139,7 +2139,7 @@ if test "$pixman" = "system"; then
else else
if test ! -d ${source_path}/pixman/pixman; then if test ! -d ${source_path}/pixman/pixman; then
echo "ERROR: pixman not present (or older than 0.18.4). Your options:" echo "ERROR: pixman not present (or older than 0.18.4). Your options:"
echo " (1) Prefered: Install the pixman devel package (any recent" echo " (1) Preferred: Install the pixman devel package (any recent"
echo " distro should have packages as Xorg needs pixman too)." echo " distro should have packages as Xorg needs pixman too)."
echo " (2) Fetch the pixman submodule, using:" echo " (2) Fetch the pixman submodule, using:"
echo " git submodule update --init pixman" echo " git submodule update --init pixman"
@ -2978,8 +2978,6 @@ EOF
else else
coroutine_backend=gthread coroutine_backend=gthread
fi fi
else
echo "Silently falling back into gthread backend under darwin"
fi fi
elif test "$coroutine" = "gthread" ; then elif test "$coroutine" = "gthread" ; then
coroutine_backend=gthread coroutine_backend=gthread

View File

@ -19,7 +19,6 @@ typedef struct a9mp_priv_state {
uint32_t old_timer_status[8]; uint32_t old_timer_status[8];
uint32_t num_cpu; uint32_t num_cpu;
MemoryRegion scu_iomem; MemoryRegion scu_iomem;
MemoryRegion ptimer_iomem;
MemoryRegion container; MemoryRegion container;
DeviceState *mptimer; DeviceState *mptimer;
DeviceState *gic; DeviceState *gic;

View File

@ -49,18 +49,16 @@ DriveInfo *add_init_drive(const char *optstr)
} }
#if !defined(TARGET_I386) #if !defined(TARGET_I386)
int pci_drive_hot_add(Monitor *mon, const QDict *qdict, int pci_drive_hot_add(Monitor *mon, const QDict *qdict, DriveInfo *dinfo)
DriveInfo *dinfo, int type)
{ {
/* On non-x86 we don't do PCI hotplug */ /* On non-x86 we don't do PCI hotplug */
monitor_printf(mon, "Can't hot-add drive to type %d\n", type); monitor_printf(mon, "Can't hot-add drive to type %d\n", dinfo->type);
return -1; return -1;
} }
#endif #endif
void drive_hot_add(Monitor *mon, const QDict *qdict) void drive_hot_add(Monitor *mon, const QDict *qdict)
{ {
int type;
DriveInfo *dinfo = NULL; DriveInfo *dinfo = NULL;
const char *opts = qdict_get_str(qdict, "opts"); const char *opts = qdict_get_str(qdict, "opts");
@ -72,14 +70,13 @@ void drive_hot_add(Monitor *mon, const QDict *qdict)
monitor_printf(mon, "Parameter addr not supported\n"); monitor_printf(mon, "Parameter addr not supported\n");
goto err; goto err;
} }
type = dinfo->type;
switch (type) { switch (dinfo->type) {
case IF_NONE: case IF_NONE:
monitor_printf(mon, "OK\n"); monitor_printf(mon, "OK\n");
break; break;
default: default:
if (pci_drive_hot_add(mon, qdict, dinfo, type)) { if (pci_drive_hot_add(mon, qdict, dinfo)) {
goto err; goto err;
} }
} }

View File

@ -98,7 +98,9 @@ static void pc_fw_add_pflash_drv(void)
return; return;
} }
drive_init(opts, machine->use_scsi); if (!drive_init(opts, machine->use_scsi)) {
qemu_opts_del(opts);
}
} }
static void pc_system_flash_init(MemoryRegion *rom_memory, static void pc_system_flash_init(MemoryRegion *rom_memory,

View File

@ -111,15 +111,14 @@ static int scsi_hot_add(Monitor *mon, DeviceState *adapter,
return 0; return 0;
} }
int pci_drive_hot_add(Monitor *mon, const QDict *qdict, int pci_drive_hot_add(Monitor *mon, const QDict *qdict, DriveInfo *dinfo)
DriveInfo *dinfo, int type)
{ {
int dom, pci_bus; int dom, pci_bus;
unsigned slot; unsigned slot;
PCIDevice *dev; PCIDevice *dev;
const char *pci_addr = qdict_get_str(qdict, "pci_addr"); const char *pci_addr = qdict_get_str(qdict, "pci_addr");
switch (type) { switch (dinfo->type) {
case IF_SCSI: case IF_SCSI:
if (pci_read_devaddr(mon, pci_addr, &dom, &pci_bus, &slot)) { if (pci_read_devaddr(mon, pci_addr, &dom, &pci_bus, &slot)) {
goto err; goto err;
@ -135,7 +134,7 @@ int pci_drive_hot_add(Monitor *mon, const QDict *qdict,
} }
break; break;
default: default:
monitor_printf(mon, "Can't hot-add drive to type %d\n", type); monitor_printf(mon, "Can't hot-add drive to type %d\n", dinfo->type);
goto err; goto err;
} }

View File

@ -51,7 +51,7 @@
/* /*
* Normally packed structures are not the right thing to do, since all code * Normally packed structures are not the right thing to do, since all code
* must take care of endianess. We cant use ldl_phys and friends for two * must take care of endianness. We cannot use ldl_phys and friends for two
* reasons, though: * reasons, though:
* - some of the embedded structures below the SCCB can appear multiple times * - some of the embedded structures below the SCCB can appear multiple times
* at different locations, so there is no fixed offset * at different locations, so there is no fixed offset
@ -60,7 +60,7 @@
* alter the structure while we parse it. We cannot use ldl_p and friends * alter the structure while we parse it. We cannot use ldl_p and friends
* either without doing pointer arithmetics * either without doing pointer arithmetics
* So we have to double check that all users of sclp data structures use the * So we have to double check that all users of sclp data structures use the
* right endianess wrappers. * right endianness wrappers.
*/ */
typedef struct SCCBHeader { typedef struct SCCBHeader {
uint16_t length; uint16_t length;

View File

@ -179,8 +179,8 @@ static int read_event_data(SCLPEvent *event, EventBufferHeader *evt_buf_hdr,
} }
/* triggered by SCLP's write_event_data /* triggered by SCLP's write_event_data
* - write console data into character layer * - write console data to character layer
* returns < 0 if an error occured * returns < 0 if an error occurred
*/ */
static ssize_t write_console_data(SCLPEvent *event, const uint8_t *buf, static ssize_t write_console_data(SCLPEvent *event, const uint8_t *buf,
size_t len) size_t len)

View File

@ -1439,8 +1439,8 @@ send_response:
int i; int i;
DPRINTF("Response:"); DPRINTF("Response:");
for (i = 0; i < rsplen; i++) for (i = 0; i < rsplen; i++)
printf(" %02x", response[i]); fprintf(stderr, " %02x", response[i]);
printf(" state %d\n", sd->state); fprintf(stderr, " state %d\n", sd->state);
} else { } else {
DPRINTF("No response %d\n", sd->state); DPRINTF("No response %d\n", sd->state);
} }

View File

@ -284,7 +284,7 @@ typedef struct USBDeviceClass {
* Called from handle_packet(). * Called from handle_packet().
* *
* Status gets stored in p->status, and if p->status == USB_RET_SUCCESS * Status gets stored in p->status, and if p->status == USB_RET_SUCCESS
* then the number of bytes transfered is stored in p->actual_length * then the number of bytes transferred is stored in p->actual_length
*/ */
void (*handle_control)(USBDevice *dev, USBPacket *p, int request, int value, void (*handle_control)(USBDevice *dev, USBPacket *p, int request, int value,
int index, int length, uint8_t *data); int index, int length, uint8_t *data);
@ -294,7 +294,7 @@ typedef struct USBDeviceClass {
* Called from handle_packet(). * Called from handle_packet().
* *
* Status gets stored in p->status, and if p->status == USB_RET_SUCCESS * Status gets stored in p->status, and if p->status == USB_RET_SUCCESS
* then the number of bytes transfered is stored in p->actual_length * then the number of bytes transferred is stored in p->actual_length
*/ */
void (*handle_data)(USBDevice *dev, USBPacket *p); void (*handle_data)(USBDevice *dev, USBPacket *p);
@ -360,7 +360,7 @@ struct USBPacket {
bool short_not_ok; bool short_not_ok;
bool int_req; bool int_req;
int status; /* USB_RET_* status code */ int status; /* USB_RET_* status code */
int actual_length; /* Number of bytes actually transfered */ int actual_length; /* Number of bytes actually transferred */
/* Internal use by the USB layer. */ /* Internal use by the USB layer. */
USBPacketState state; USBPacketState state;
USBCombinedPacket *combined; USBCombinedPacket *combined;

View File

@ -565,7 +565,7 @@ static void tap_win32_free_buffer(tap_win32_overlapped_t *overlapped,
} }
static int tap_win32_open(tap_win32_overlapped_t **phandle, static int tap_win32_open(tap_win32_overlapped_t **phandle,
const char *prefered_name) const char *preferred_name)
{ {
char device_path[256]; char device_path[256];
char device_guid[0x100]; char device_guid[0x100];
@ -581,8 +581,9 @@ static int tap_win32_open(tap_win32_overlapped_t **phandle,
DWORD version_len; DWORD version_len;
DWORD idThread; DWORD idThread;
if (prefered_name != NULL) if (preferred_name != NULL) {
snprintf(name_buffer, sizeof(name_buffer), "%s", prefered_name); snprintf(name_buffer, sizeof(name_buffer), "%s", preferred_name);
}
rc = get_device_guid(device_guid, sizeof(device_guid), name_buffer, sizeof(name_buffer)); rc = get_device_guid(device_guid, sizeof(device_guid), name_buffer, sizeof(name_buffer));
if (rc) if (rc)

View File

@ -1331,7 +1331,7 @@ DEF("net", HAS_ARG, QEMU_OPTION_net,
" connect the host TAP network interface to VLAN 'n'\n" " connect the host TAP network interface to VLAN 'n'\n"
#else #else
"-net tap[,vlan=n][,name=str][,fd=h][,ifname=name][,script=file][,downscript=dfile][,helper=helper][,sndbuf=nbytes][,vnet_hdr=on|off][,vhost=on|off][,vhostfd=h][,vhostforce=on|off]\n" "-net tap[,vlan=n][,name=str][,fd=h][,ifname=name][,script=file][,downscript=dfile][,helper=helper][,sndbuf=nbytes][,vnet_hdr=on|off][,vhost=on|off][,vhostfd=h][,vhostforce=on|off]\n"
" connect the host TAP network interface to VLAN 'n' \n" " connect the host TAP network interface to VLAN 'n'\n"
" use network scripts 'file' (default=" DEFAULT_NETWORK_SCRIPT ")\n" " use network scripts 'file' (default=" DEFAULT_NETWORK_SCRIPT ")\n"
" to configure it and 'dfile' (default=" DEFAULT_NETWORK_DOWN_SCRIPT ")\n" " to configure it and 'dfile' (default=" DEFAULT_NETWORK_DOWN_SCRIPT ")\n"
" to deconfigure it\n" " to deconfigure it\n"

View File

@ -352,7 +352,7 @@ icmp_error(struct mbuf *msrc, u_char type, u_char code, int minsize,
ip->ip_ttl = MAXTTL; ip->ip_ttl = MAXTTL;
ip->ip_p = IPPROTO_ICMP; ip->ip_p = IPPROTO_ICMP;
ip->ip_dst = ip->ip_src; /* ip adresses */ ip->ip_dst = ip->ip_src; /* ip addresses */
ip->ip_src = m->slirp->vhost_addr; ip->ip_src = m->slirp->vhost_addr;
(void ) ip_output((struct socket *)NULL, m); (void ) ip_output((struct socket *)NULL, m);

View File

@ -145,8 +145,7 @@ extern unsigned int nb_prom_envs;
/* pci-hotplug */ /* pci-hotplug */
void pci_device_hot_add(Monitor *mon, const QDict *qdict); void pci_device_hot_add(Monitor *mon, const QDict *qdict);
int pci_drive_hot_add(Monitor *mon, const QDict *qdict, int pci_drive_hot_add(Monitor *mon, const QDict *qdict, DriveInfo *dinfo);
DriveInfo *dinfo, int type);
void do_pci_device_hot_remove(Monitor *mon, const QDict *qdict); void do_pci_device_hot_remove(Monitor *mon, const QDict *qdict);
/* generic hotplug */ /* generic hotplug */

View File

@ -280,13 +280,6 @@ struct CPUAlphaState {
struct QEMUTimer *alarm_timer; struct QEMUTimer *alarm_timer;
uint64_t alarm_expire; uint64_t alarm_expire;
#if TARGET_LONG_BITS > HOST_LONG_BITS
/* temporary fixed-point registers
* used to emulate 64 bits target on 32 bits hosts
*/
target_ulong t0, t1;
#endif
/* Those resources are used only in QEMU core */ /* Those resources are used only in QEMU core */
CPU_COMMON CPU_COMMON

View File

@ -103,9 +103,6 @@ typedef struct CPUM68KState {
uint32_t rambar0; uint32_t rambar0;
uint32_t cacr; uint32_t cacr;
/* ??? remove this. */
uint32_t t1;
int pending_vector; int pending_vector;
int pending_level; int pending_level;

View File

@ -392,7 +392,6 @@ struct CPUSPARCState {
target_ulong cc_dst; target_ulong cc_dst;
uint32_t cc_op; uint32_t cc_op;
target_ulong t0, t1; /* temporaries live across basic blocks */
target_ulong cond; /* conditional branch result (XXX: save it in a target_ulong cond; /* conditional branch result (XXX: save it in a
temporary register when possible) */ temporary register when possible) */

View File

@ -290,8 +290,8 @@ typedef int TCGv_i64;
#define TCG_CALL_DUMMY_TCGV MAKE_TCGV_I32(-1) #define TCG_CALL_DUMMY_TCGV MAKE_TCGV_I32(-1)
#define TCG_CALL_DUMMY_ARG ((TCGArg)(-1)) #define TCG_CALL_DUMMY_ARG ((TCGArg)(-1))
/* Conditions. Note that these are layed out for easy manipulation by /* Conditions. Note that these are laid out for easy manipulation by
the the functions below: the functions below:
bit 0 is used for inverting; bit 0 is used for inverting;
bit 1 is signed, bit 1 is signed,
bit 2 is unsigned, bit 2 is unsigned,

View File

@ -43,7 +43,7 @@ def qemu_img(*args):
return subprocess.call(qemu_img_args + list(args), stdin=devnull, stdout=devnull) return subprocess.call(qemu_img_args + list(args), stdin=devnull, stdout=devnull)
def qemu_img_verbose(*args): def qemu_img_verbose(*args):
'''Run qemu-img without supressing its output and return the exit code''' '''Run qemu-img without suppressing its output and return the exit code'''
return subprocess.call(qemu_img_args + list(args)) return subprocess.call(qemu_img_args + list(args))
def qemu_io(*args): def qemu_io(*args):

4
uri.c
View File

@ -432,7 +432,7 @@ rfc3986_parse_host(URI *uri, const char **str)
host = cur; host = cur;
/* /*
* IPv6 and future adressing scheme are enclosed between brackets * IPv6 and future addressing scheme are enclosed between brackets
*/ */
if (*cur == '[') { if (*cur == '[') {
cur++; cur++;
@ -1917,7 +1917,7 @@ done:
* http://site1.com/docs/pic1.gif http://site1.com/docs/pic1.gif * http://site1.com/docs/pic1.gif http://site1.com/docs/pic1.gif
* *
* *
* Note: if the URI reference is really wierd or complicated, it may be * Note: if the URI reference is really weird or complicated, it may be
* worthwhile to first convert it into a "nice" one by calling * worthwhile to first convert it into a "nice" one by calling
* uri_resolve (using 'base') before calling this routine, * uri_resolve (using 'base') before calling this routine,
* since this routine (for reasonable efficiency) assumes URI has * since this routine (for reasonable efficiency) assumes URI has