mirror of https://github.com/xqemu/xqemu.git
Merge remote-tracking branch 'stefanha/trivial-patches' into HEAD
* stefanha/trivial-patches: bt-host: add missing break statement virtfs-proxy-helper: Add missing printf format attribute virtfs-proxy-helper: Clean include files virtfs-proxy-helper: Fix compilation on newer systems hmp: Fix freeing of PciInfoList Add 'fall through' comments to case statements without break omap_dss: correct chip[1] index in RFBI_READ/RFBI_STATUS vnc: fix no-lock-key-sync strncmp() length vvfat: avoid leaking file descriptor in commit_one_file() Spelling fixes in comments and documentation tcg-arm: fix a typo in comments configure: Modify detection of supported warning options
This commit is contained in:
commit
607a2c72e5
|
@ -2218,6 +2218,7 @@ static int commit_one_file(BDRVVVFATState* s,
|
||||||
}
|
}
|
||||||
if (offset > 0) {
|
if (offset > 0) {
|
||||||
if (lseek(fd, offset, SEEK_SET) != offset) {
|
if (lseek(fd, offset, SEEK_SET) != offset) {
|
||||||
|
close(fd);
|
||||||
g_free(cluster);
|
g_free(cluster);
|
||||||
return -3;
|
return -3;
|
||||||
}
|
}
|
||||||
|
@ -2238,11 +2239,13 @@ static int commit_one_file(BDRVVVFATState* s,
|
||||||
(uint8_t*)cluster, (rest_size + 0x1ff) / 0x200);
|
(uint8_t*)cluster, (rest_size + 0x1ff) / 0x200);
|
||||||
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
close(fd);
|
||||||
g_free(cluster);
|
g_free(cluster);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (write(fd, cluster, rest_size) < 0) {
|
if (write(fd, cluster, rest_size) < 0) {
|
||||||
|
close(fd);
|
||||||
g_free(cluster);
|
g_free(cluster);
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
|
|
|
@ -130,6 +130,7 @@ static void bt_host_read(void *opaque)
|
||||||
pktlen = MIN(pkt[2] + 3, s->len);
|
pktlen = MIN(pkt[2] + 3, s->len);
|
||||||
s->len -= pktlen;
|
s->len -= pktlen;
|
||||||
pkt += pktlen;
|
pkt += pktlen;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
bad_pkt:
|
bad_pkt:
|
||||||
|
|
|
@ -1105,7 +1105,7 @@ cat > $TMPC << EOF
|
||||||
int main(void) { return 0; }
|
int main(void) { return 0; }
|
||||||
EOF
|
EOF
|
||||||
for flag in $gcc_flags; do
|
for flag in $gcc_flags; do
|
||||||
if compile_prog "$flag -Werror" "" ; then
|
if compile_prog "-Werror $flag" "" ; then
|
||||||
QEMU_CFLAGS="$QEMU_CFLAGS $flag"
|
QEMU_CFLAGS="$QEMU_CFLAGS $flag"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
|
@ -435,7 +435,7 @@ There are a number of things to be noticed:
|
||||||
for all QMP functions)
|
for all QMP functions)
|
||||||
3. The "clock" variable (which will point to our QAPI type instance) is
|
3. The "clock" variable (which will point to our QAPI type instance) is
|
||||||
allocated by the regular g_malloc0() function. Note that we chose to
|
allocated by the regular g_malloc0() function. Note that we chose to
|
||||||
initialize the memory to zero. This is recomended for all QAPI types, as
|
initialize the memory to zero. This is recommended for all QAPI types, as
|
||||||
it helps avoiding bad surprises (specially with booleans)
|
it helps avoiding bad surprises (specially with booleans)
|
||||||
4. Remember that "next_deadline" is optional? All optional members have a
|
4. Remember that "next_deadline" is optional? All optional members have a
|
||||||
'has_TYPE_NAME' member that should be properly set by the implementation,
|
'has_TYPE_NAME' member that should be properly set by the implementation,
|
||||||
|
|
2
exec.c
2
exec.c
|
@ -511,7 +511,7 @@ static void code_gen_alloc(unsigned long tb_size)
|
||||||
if (code_gen_buffer_size > (512 * 1024 * 1024))
|
if (code_gen_buffer_size > (512 * 1024 * 1024))
|
||||||
code_gen_buffer_size = (512 * 1024 * 1024);
|
code_gen_buffer_size = (512 * 1024 * 1024);
|
||||||
#elif defined(__arm__)
|
#elif defined(__arm__)
|
||||||
/* Keep the buffer no bigger than 16GB to branch between blocks */
|
/* Keep the buffer no bigger than 16MB to branch between blocks */
|
||||||
if (code_gen_buffer_size > 16 * 1024 * 1024)
|
if (code_gen_buffer_size > 16 * 1024 * 1024)
|
||||||
code_gen_buffer_size = 16 * 1024 * 1024;
|
code_gen_buffer_size = 16 * 1024 * 1024;
|
||||||
#elif defined(__s390x__)
|
#elif defined(__s390x__)
|
||||||
|
|
|
@ -8,32 +8,21 @@
|
||||||
* This work is licensed under the terms of the GNU GPL, version 2. See
|
* This work is licensed under the terms of the GNU GPL, version 2. See
|
||||||
* the COPYING file in the top-level directory.
|
* the COPYING file in the top-level directory.
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <sys/un.h>
|
|
||||||
#include <limits.h>
|
|
||||||
#include <signal.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <unistd.h>
|
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
#include <sys/capability.h>
|
#include <sys/capability.h>
|
||||||
#include <sys/fsuid.h>
|
#include <sys/fsuid.h>
|
||||||
#include <stdarg.h>
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <sys/vfs.h>
|
#include <sys/vfs.h>
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <attr/xattr.h>
|
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#ifdef CONFIG_LINUX_MAGIC_H
|
#ifdef CONFIG_LINUX_MAGIC_H
|
||||||
#include <linux/magic.h>
|
#include <linux/magic.h>
|
||||||
#endif
|
#endif
|
||||||
#include "qemu-common.h"
|
#include "qemu-common.h"
|
||||||
|
#include "qemu_socket.h"
|
||||||
|
#include "qemu-xattr.h"
|
||||||
#include "virtio-9p-marshal.h"
|
#include "virtio-9p-marshal.h"
|
||||||
#include "hw/9pfs/virtio-9p-proxy.h"
|
#include "hw/9pfs/virtio-9p-proxy.h"
|
||||||
#include "fsdev/virtio-9p-marshal.h"
|
#include "fsdev/virtio-9p-marshal.h"
|
||||||
|
@ -65,7 +54,7 @@ static struct option helper_opts[] = {
|
||||||
static bool is_daemon;
|
static bool is_daemon;
|
||||||
static bool get_version; /* IOC getversion IOCTL supported */
|
static bool get_version; /* IOC getversion IOCTL supported */
|
||||||
|
|
||||||
static void do_log(int loglevel, const char *format, ...)
|
static void GCC_FMT_ATTR(2, 3) do_log(int loglevel, const char *format, ...)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
|
|
8
hmp.c
8
hmp.c
|
@ -486,17 +486,17 @@ static void hmp_info_pci_device(Monitor *mon, const PciDeviceInfo *dev)
|
||||||
|
|
||||||
void hmp_info_pci(Monitor *mon)
|
void hmp_info_pci(Monitor *mon)
|
||||||
{
|
{
|
||||||
PciInfoList *info;
|
PciInfoList *info_list, *info;
|
||||||
Error *err = NULL;
|
Error *err = NULL;
|
||||||
|
|
||||||
info = qmp_query_pci(&err);
|
info_list = qmp_query_pci(&err);
|
||||||
if (err) {
|
if (err) {
|
||||||
monitor_printf(mon, "PCI devices not supported\n");
|
monitor_printf(mon, "PCI devices not supported\n");
|
||||||
error_free(err);
|
error_free(err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (; info; info = info->next) {
|
for (info = info_list; info; info = info->next) {
|
||||||
PciDeviceInfoList *dev;
|
PciDeviceInfoList *dev;
|
||||||
|
|
||||||
for (dev = info->value->devices; dev; dev = dev->next) {
|
for (dev = info->value->devices; dev; dev = dev->next) {
|
||||||
|
@ -504,7 +504,7 @@ void hmp_info_pci(Monitor *mon)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
qapi_free_PciInfoList(info);
|
qapi_free_PciInfoList(info_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
void hmp_quit(Monitor *mon, const QDict *qdict)
|
void hmp_quit(Monitor *mon, const QDict *qdict)
|
||||||
|
|
|
@ -793,7 +793,7 @@ static void omap_rfbi_write(void *opaque, target_phys_addr_t addr,
|
||||||
if ((s->rfbi.control & (1 << 2)) && s->rfbi.chip[0])
|
if ((s->rfbi.control & (1 << 2)) && s->rfbi.chip[0])
|
||||||
s->rfbi.rxbuf = s->rfbi.chip[0]->read(s->rfbi.chip[0]->opaque, 1);
|
s->rfbi.rxbuf = s->rfbi.chip[0]->read(s->rfbi.chip[0]->opaque, 1);
|
||||||
else if ((s->rfbi.control & (1 << 3)) && s->rfbi.chip[1])
|
else if ((s->rfbi.control & (1 << 3)) && s->rfbi.chip[1])
|
||||||
s->rfbi.rxbuf = s->rfbi.chip[0]->read(s->rfbi.chip[0]->opaque, 1);
|
s->rfbi.rxbuf = s->rfbi.chip[1]->read(s->rfbi.chip[1]->opaque, 1);
|
||||||
if (!-- s->rfbi.pixels)
|
if (!-- s->rfbi.pixels)
|
||||||
omap_rfbi_transfer_stop(s);
|
omap_rfbi_transfer_stop(s);
|
||||||
break;
|
break;
|
||||||
|
@ -802,7 +802,7 @@ static void omap_rfbi_write(void *opaque, target_phys_addr_t addr,
|
||||||
if ((s->rfbi.control & (1 << 2)) && s->rfbi.chip[0])
|
if ((s->rfbi.control & (1 << 2)) && s->rfbi.chip[0])
|
||||||
s->rfbi.rxbuf = s->rfbi.chip[0]->read(s->rfbi.chip[0]->opaque, 0);
|
s->rfbi.rxbuf = s->rfbi.chip[0]->read(s->rfbi.chip[0]->opaque, 0);
|
||||||
else if ((s->rfbi.control & (1 << 3)) && s->rfbi.chip[1])
|
else if ((s->rfbi.control & (1 << 3)) && s->rfbi.chip[1])
|
||||||
s->rfbi.rxbuf = s->rfbi.chip[0]->read(s->rfbi.chip[0]->opaque, 0);
|
s->rfbi.rxbuf = s->rfbi.chip[1]->read(s->rfbi.chip[1]->opaque, 0);
|
||||||
if (!-- s->rfbi.pixels)
|
if (!-- s->rfbi.pixels)
|
||||||
omap_rfbi_transfer_stop(s);
|
omap_rfbi_transfer_stop(s);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1505,6 +1505,7 @@ static void pcnet_bcr_writew(PCNetState *s, uint32_t rap, uint32_t val)
|
||||||
#ifdef PCNET_DEBUG
|
#ifdef PCNET_DEBUG
|
||||||
printf("BCR_SWS=0x%04x\n", val);
|
printf("BCR_SWS=0x%04x\n", val);
|
||||||
#endif
|
#endif
|
||||||
|
/* fall through */
|
||||||
case BCR_LNKST:
|
case BCR_LNKST:
|
||||||
case BCR_LED1:
|
case BCR_LED1:
|
||||||
case BCR_LED2:
|
case BCR_LED2:
|
||||||
|
|
|
@ -301,6 +301,7 @@ static int json_lexer_feed_char(JSONLexer *lexer, char ch, bool flush)
|
||||||
case JSON_KEYWORD:
|
case JSON_KEYWORD:
|
||||||
case JSON_STRING:
|
case JSON_STRING:
|
||||||
lexer->emit(lexer, lexer->token, new_state, lexer->x, lexer->y);
|
lexer->emit(lexer, lexer->token, new_state, lexer->x, lexer->y);
|
||||||
|
/* fall through */
|
||||||
case JSON_SKIP:
|
case JSON_SKIP:
|
||||||
QDECREF(lexer->token);
|
QDECREF(lexer->token);
|
||||||
lexer->token = qstring_new();
|
lexer->token = qstring_new();
|
||||||
|
|
4
memory.h
4
memory.h
|
@ -561,7 +561,7 @@ void memory_region_add_subregion_overlap(MemoryRegion *mr,
|
||||||
* memory_region_get_ram_addr: Get the ram address associated with a memory
|
* memory_region_get_ram_addr: Get the ram address associated with a memory
|
||||||
* region
|
* region
|
||||||
*
|
*
|
||||||
* DO NOT USE THIS FUCNTION. This is a temporary workaround while the Xen
|
* DO NOT USE THIS FUNCTION. This is a temporary workaround while the Xen
|
||||||
* code is being reworked.
|
* code is being reworked.
|
||||||
*/
|
*/
|
||||||
ram_addr_t memory_region_get_ram_addr(MemoryRegion *mr);
|
ram_addr_t memory_region_get_ram_addr(MemoryRegion *mr);
|
||||||
|
@ -650,7 +650,7 @@ void memory_global_sync_dirty_bitmap(MemoryRegion *address_space);
|
||||||
* memory_region_transaction_begin: Start a transaction.
|
* memory_region_transaction_begin: Start a transaction.
|
||||||
*
|
*
|
||||||
* During a transaction, changes will be accumulated and made visible
|
* During a transaction, changes will be accumulated and made visible
|
||||||
* only when the transaction ends (is commited).
|
* only when the transaction ends (is committed).
|
||||||
*/
|
*/
|
||||||
void memory_region_transaction_begin(void);
|
void memory_region_transaction_begin(void);
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,7 @@ static void usage(const char *cmd)
|
||||||
" -v, --verbose log extra debugging information\n"
|
" -v, --verbose log extra debugging information\n"
|
||||||
" -V, --version print version information and exit\n"
|
" -V, --version print version information and exit\n"
|
||||||
" -d, --daemonize become a daemon\n"
|
" -d, --daemonize become a daemon\n"
|
||||||
" -b, --blacklist comma-seperated list of RPCs to disable (no spaces, \"?\""
|
" -b, --blacklist comma-separated list of RPCs to disable (no spaces, \"?\""
|
||||||
" to list available RPCs)\n"
|
" to list available RPCs)\n"
|
||||||
" -h, --help display this help and exit\n"
|
" -h, --help display this help and exit\n"
|
||||||
"\n"
|
"\n"
|
||||||
|
|
|
@ -214,13 +214,17 @@ static int parse_option_size(const char *name, const char *value, uint64_t *ret)
|
||||||
switch (*postfix) {
|
switch (*postfix) {
|
||||||
case 'T':
|
case 'T':
|
||||||
sizef *= 1024;
|
sizef *= 1024;
|
||||||
|
/* fall through */
|
||||||
case 'G':
|
case 'G':
|
||||||
sizef *= 1024;
|
sizef *= 1024;
|
||||||
|
/* fall through */
|
||||||
case 'M':
|
case 'M':
|
||||||
sizef *= 1024;
|
sizef *= 1024;
|
||||||
|
/* fall through */
|
||||||
case 'K':
|
case 'K':
|
||||||
case 'k':
|
case 'k':
|
||||||
sizef *= 1024;
|
sizef *= 1024;
|
||||||
|
/* fall through */
|
||||||
case 'b':
|
case 'b':
|
||||||
case '\0':
|
case '\0':
|
||||||
*ret = (uint64_t) sizef;
|
*ret = (uint64_t) sizef;
|
||||||
|
|
|
@ -843,7 +843,7 @@ static inline void tcg_out_st8(TCGContext *s, int cond,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The _goto case is normally between TBs within the same code buffer,
|
/* The _goto case is normally between TBs within the same code buffer,
|
||||||
* and with the code buffer limited to 16GB we shouldn't need the long
|
* and with the code buffer limited to 16MB we shouldn't need the long
|
||||||
* case.
|
* case.
|
||||||
*
|
*
|
||||||
* .... except to the prologue that is in its own buffer.
|
* .... except to the prologue that is in its own buffer.
|
||||||
|
|
2
ui/vnc.c
2
ui/vnc.c
|
@ -2763,7 +2763,7 @@ int vnc_display_open(DisplayState *ds, const char *display)
|
||||||
password = 1; /* Require password auth */
|
password = 1; /* Require password auth */
|
||||||
} else if (strncmp(options, "reverse", 7) == 0) {
|
} else if (strncmp(options, "reverse", 7) == 0) {
|
||||||
reverse = 1;
|
reverse = 1;
|
||||||
} else if (strncmp(options, "no-lock-key-sync", 9) == 0) {
|
} else if (strncmp(options, "no-lock-key-sync", 16) == 0) {
|
||||||
lock_key_sync = 0;
|
lock_key_sync = 0;
|
||||||
#ifdef CONFIG_VNC_SASL
|
#ifdef CONFIG_VNC_SASL
|
||||||
} else if (strncmp(options, "sasl", 4) == 0) {
|
} else if (strncmp(options, "sasl", 4) == 0) {
|
||||||
|
|
Loading…
Reference in New Issue