summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--block-migration.c2
-rw-r--r--hw/i386/pc_piix.c2
-rw-r--r--hw/i386/pc_q35.c2
-rw-r--r--hw/usb/hcd-ohci.c2
-rw-r--r--include/libdecnumber/decNumberLocal.h2
-rw-r--r--net/slirp.c1
-rw-r--r--qemu-doc.texi13
-rw-r--r--qemu-img.c1
-rw-r--r--qga/commands-posix.c2
-rw-r--r--tests/fdc-test.c2
-rw-r--r--tests/test-aio.c2
-rw-r--r--tests/test-qemu-opts.c2
-rw-r--r--tests/test-throttle.c8
-rw-r--r--tests/test-visitor-serialization.c6
-rw-r--r--tests/test-vmstate.c4
-rw-r--r--xen-hvm.c2
16 files changed, 30 insertions, 23 deletions
diff --git a/block-migration.c b/block-migration.c
index 25a0388..73cdd07 100644
--- a/block-migration.c
+++ b/block-migration.c
@@ -861,7 +861,7 @@ static bool block_is_active(void *opaque)
return block_mig_state.blk_enable == 1;
}
-SaveVMHandlers savevm_block_handlers = {
+static SaveVMHandlers savevm_block_handlers = {
.set_params = block_set_params,
.save_live_setup = block_save_setup,
.save_live_iterate = block_save_iterate,
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index ec8ccdb..7081c08 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -114,7 +114,7 @@ static void pc_init1(MachineState *machine,
lowmem = 0xe0000000;
}
- /* Handle the machine opt max-ram-below-4g. It is basicly doing
+ /* Handle the machine opt max-ram-below-4g. It is basically doing
* min(qemu limit, user limit).
*/
if (lowmem > pc_machine->max_ram_below_4g) {
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 36b6ab0..f551961 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -103,7 +103,7 @@ static void pc_q35_init(MachineState *machine)
lowmem = 0xb0000000;
}
- /* Handle the machine opt max-ram-below-4g. It is basicly doing
+ /* Handle the machine opt max-ram-below-4g. It is basically doing
* min(qemu limit, user limit).
*/
if (lowmem > pc_machine->max_ram_below_4g) {
diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c
index cace945..13afdf5 100644
--- a/hw/usb/hcd-ohci.c
+++ b/hw/usb/hcd-ohci.c
@@ -2021,7 +2021,7 @@ static const VMStateDescription vmstate_ohci_eof_timer = {
},
};
-const VMStateDescription vmstate_ohci_state = {
+static const VMStateDescription vmstate_ohci_state = {
.name = "ohci-core",
.version_id = 1,
.minimum_version_id = 1,
diff --git a/include/libdecnumber/decNumberLocal.h b/include/libdecnumber/decNumberLocal.h
index cd4eb79..71ed77b 100644
--- a/include/libdecnumber/decNumberLocal.h
+++ b/include/libdecnumber/decNumberLocal.h
@@ -153,7 +153,7 @@
/* ---------------------------------------------------------------- */
- /* Definitions for arbitary-precision modules (only valid after */
+ /* Definitions for arbitrary-precision modules (only valid after */
/* decNumber.h has been included) */
/* ---------------------------------------------------------------- */
diff --git a/net/slirp.c b/net/slirp.c
index 8fddc03..647039e 100644
--- a/net/slirp.c
+++ b/net/slirp.c
@@ -282,6 +282,7 @@ static SlirpState *slirp_lookup(Monitor *mon, const char *vlan,
NetClientState *nc;
nc = net_hub_find_client_by_name(strtol(vlan, NULL, 0), stack);
if (!nc) {
+ monitor_printf(mon, "unrecognized (vlan-id, stackname) pair\n");
return NULL;
}
if (strcmp(nc->model, "user")) {
diff --git a/qemu-doc.texi b/qemu-doc.texi
index 551619a..2b232ae 100644
--- a/qemu-doc.texi
+++ b/qemu-doc.texi
@@ -1205,9 +1205,16 @@ In order to check that the user mode network is working, you can ping
the address 10.0.2.2 and verify that you got an address in the range
10.0.2.x from the QEMU virtual DHCP server.
-Note that @code{ping} is not supported reliably to the internet as it
-would require root privileges. It means you can only ping the local
-router (10.0.2.2).
+Note that ICMP traffic in general does not work with user mode networking.
+@code{ping}, aka. ICMP echo, to the local router (10.0.2.2) shall work,
+however. If you're using QEMU on Linux >= 3.0, it can use unprivileged ICMP
+ping sockets to allow @code{ping} to the Internet. The host admin has to set
+the ping_group_range in order to grant access to those sockets. To allow ping
+for GID 100 (usually users group):
+
+@example
+echo 100 100 > /proc/sys/net/ipv4/ping_group_range
+@end example
When using the built-in TFTP server, the router is also the TFTP
server.
diff --git a/qemu-img.c b/qemu-img.c
index c98896b..d4518e7 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -246,7 +246,6 @@ static int read_password(char *buf, int buf_size)
if (errno == EAGAIN || errno == EINTR) {
continue;
} else {
- ret = -1;
break;
}
} else if (ret == 0) {
diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index 34ddba0..8e6272c 100644
--- a/qga/commands-posix.c
+++ b/qga/commands-posix.c
@@ -643,7 +643,7 @@ typedef enum {
FSFREEZE_HOOK_FREEZE,
} FsfreezeHookArg;
-const char *fsfreeze_hook_arg_string[] = {
+static const char *fsfreeze_hook_arg_string[] = {
"thaw",
"freeze",
};
diff --git a/tests/fdc-test.c b/tests/fdc-test.c
index c8e1e7b..203074c 100644
--- a/tests/fdc-test.c
+++ b/tests/fdc-test.c
@@ -65,7 +65,7 @@ enum {
DSKCHG = 0x80,
};
-char test_image[] = "/tmp/qtest.XXXXXX";
+static char test_image[] = "/tmp/qtest.XXXXXX";
#define assert_bit_set(data, mask) g_assert_cmphex((data) & (mask), ==, (mask))
#define assert_bit_clear(data, mask) g_assert_cmphex((data) & (mask), ==, 0)
diff --git a/tests/test-aio.c b/tests/test-aio.c
index 4c40a49..f12b6e0 100644
--- a/tests/test-aio.c
+++ b/tests/test-aio.c
@@ -15,7 +15,7 @@
#include "qemu/timer.h"
#include "qemu/sockets.h"
-AioContext *ctx;
+static AioContext *ctx;
typedef struct {
EventNotifier e;
diff --git a/tests/test-qemu-opts.c b/tests/test-qemu-opts.c
index 3653507..ca08ac5 100644
--- a/tests/test-qemu-opts.c
+++ b/tests/test-qemu-opts.c
@@ -56,7 +56,7 @@ static QemuOptsList opts_list_02 = {
},
};
-QemuOptsList opts_list_03 = {
+static QemuOptsList opts_list_03 = {
.name = "opts_list_03",
.head = QTAILQ_HEAD_INITIALIZER(opts_list_03.head),
.desc = {
diff --git a/tests/test-throttle.c b/tests/test-throttle.c
index 3de6ab8..000ae31 100644
--- a/tests/test-throttle.c
+++ b/tests/test-throttle.c
@@ -15,10 +15,10 @@
#include "block/aio.h"
#include "qemu/throttle.h"
-AioContext *ctx;
-LeakyBucket bkt;
-ThrottleConfig cfg;
-ThrottleState ts;
+static AioContext *ctx;
+static LeakyBucket bkt;
+static ThrottleConfig cfg;
+static ThrottleState ts;
/* useful function */
static bool double_cmp(double x, double y)
diff --git a/tests/test-visitor-serialization.c b/tests/test-visitor-serialization.c
index 74d6481..7ad1886 100644
--- a/tests/test-visitor-serialization.c
+++ b/tests/test-visitor-serialization.c
@@ -372,8 +372,8 @@ static void test_primitive_lists(gconstpointer opaque)
TestArgs *args = (TestArgs *) opaque;
const SerializeOps *ops = args->ops;
PrimitiveType *pt = args->test_data;
- PrimitiveList pl = { .value = { 0 } };
- PrimitiveList pl_copy = { .value = { 0 } };
+ PrimitiveList pl = { .value = { NULL } };
+ PrimitiveList pl_copy = { .value = { NULL } };
PrimitiveList *pl_copy_ptr = &pl_copy;
Error *err = NULL;
void *serialize_data;
@@ -771,7 +771,7 @@ static void test_nested_struct_list(gconstpointer opaque)
g_free(args);
}
-PrimitiveType pt_values[] = {
+static PrimitiveType pt_values[] = {
/* string tests */
{
.description = "string_empty",
diff --git a/tests/test-vmstate.c b/tests/test-vmstate.c
index a462335..d72c64c 100644
--- a/tests/test-vmstate.c
+++ b/tests/test-vmstate.c
@@ -29,8 +29,8 @@
#include "migration/vmstate.h"
#include "block/coroutine.h"
-char temp_file[] = "/tmp/vmst.test.XXXXXX";
-int temp_fd;
+static char temp_file[] = "/tmp/vmst.test.XXXXXX";
+static int temp_fd;
/* Fake yield_until_fd_readable() implementation so we don't have to pull the
* coroutine code as dependency.
diff --git a/xen-hvm.c b/xen-hvm.c
index c928b36..a2486cf 100644
--- a/xen-hvm.c
+++ b/xen-hvm.c
@@ -165,7 +165,7 @@ static void xen_ram_init(ram_addr_t *below_4g_mem_size,
PC_MACHINE_MAX_RAM_BELOW_4G,
&error_abort);
- /* Handle the machine opt max-ram-below-4g. It is basicly doing
+ /* Handle the machine opt max-ram-below-4g. It is basically doing
* min(xen limit, user limit).
*/
if (HVM_BELOW_4G_RAM_END <= user_lowmem) {
OpenPOWER on IntegriCloud