trivial patches for 2014-07-18

-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQEcBAABAgAGBQJTySl7AAoJEL7lnXSkw9fbXvIH/3RUtN6m1rjYjnZOdmFQmSE9
 YkD+IviRH336whytrsaGCh+UVB8VwBR8FXz7QK/+N2WjFiK2jDKjQ8VirJkbdcDJ
 O6nJw9jSoYRksPslpQTQV3bqNqSny6KDIDGvEJZ7iwhxCcUxhV5v/O5LTd3iy9L0
 t0KTuGIOnPE7GtzsT01RLaMe34BUlac5QpN7jqY6uBbH+1JpAIE5xl36+6rQyT0y
 RHkhbEW3wHju5usTJojioA+S7sUJfRdzoJZZY9f1FgM4lZXQGsnKeYoDt+PEpunW
 0fFXCRJfKrFfHgNCJ0zWDwJDlq55lpDoyp5OBW0gD71Zo0xv3DMtCFlKDUiKth0=
 =RCw3
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-07-18' into staging

trivial patches for 2014-07-18

# gpg: Signature made Fri 18 Jul 2014 15:04:43 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>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 6EE1 95D1 886E 8FFB 810D  4324 457C E0A0 8044 65C5
#      Subkey fingerprint: 6F67 E18E 7C91 C5B1 5514  66A7 BEE5 9D74 A4C3 D7DB

* remotes/mjt/tags/trivial-patches-2014-07-18:
  tests: Add missing 'static' attributes (fix warnings from smatch)
  migration: Add missing 'static' attribute
  qga: Add missing 'static' attribute
  hw/usb: Add missing 'static' attribute
  doc: slirp supports ICMP echo if enabled in Linux
  qemu-img: Remove redundancy "ret = -1"
  Fix new typos in comments (found by codespell)
  slirp: Give error message if hostfwd_add/remove for unrecognized vlan/stack

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2014-07-18 16:59:29 +01:00
commit 147fc41973
16 changed files with 30 additions and 23 deletions

View File

@ -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,

View File

@ -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) {

View File

@ -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) {

View File

@ -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,

View File

@ -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) */
/* ---------------------------------------------------------------- */

View File

@ -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")) {

View File

@ -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.

View File

@ -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) {

View File

@ -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",
};

View File

@ -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)

View File

@ -15,7 +15,7 @@
#include "qemu/timer.h"
#include "qemu/sockets.h"
AioContext *ctx;
static AioContext *ctx;
typedef struct {
EventNotifier e;

View File

@ -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 = {

View File

@ -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)

View File

@ -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",

View File

@ -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.

View File

@ -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) {