mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-08 12:41:29 +00:00
Clean up the global name space.
* src/qemu_conf.c: Add "static" and "const" attributes to some globals. * src/qemu_conf.h: Update a declaration. * src/qemu_driver.c (qemud_driver): Declare static. Author: Jim Meyering <meyering@redhat.com>
This commit is contained in:
parent
f510a6128b
commit
2edab512a0
@ -1,5 +1,10 @@
|
|||||||
2008-01-14 Jim Meyering <meyering@redhat.com>
|
2008-01-14 Jim Meyering <meyering@redhat.com>
|
||||||
|
|
||||||
|
Clean up the global name space.
|
||||||
|
* src/qemu_conf.c: Add "static" and "const" attributes to some globals.
|
||||||
|
* src/qemu_conf.h: Update a declaration.
|
||||||
|
* src/qemu_driver.c (qemud_driver): Declare static.
|
||||||
|
|
||||||
Clean up global name space in examples and tests.
|
Clean up global name space in examples and tests.
|
||||||
* docs/examples/suspend.c: Declare global "conn" to be static.
|
* docs/examples/suspend.c: Declare global "conn" to be static.
|
||||||
* tests/qemuxml2argvtest.c: Declare global "driver" to be static.
|
* tests/qemuxml2argvtest.c: Declare global "driver" to be static.
|
||||||
|
@ -231,35 +231,35 @@ void qemudFreeVM(struct qemud_vm *vm) {
|
|||||||
|
|
||||||
/* The list of possible machine types for various architectures,
|
/* The list of possible machine types for various architectures,
|
||||||
as supported by QEMU - taken from 'qemu -M ?' for each arch */
|
as supported by QEMU - taken from 'qemu -M ?' for each arch */
|
||||||
static const char *arch_info_x86_machines[] = {
|
static const char *const arch_info_x86_machines[] = {
|
||||||
"pc", "isapc", NULL
|
"pc", "isapc", NULL
|
||||||
};
|
};
|
||||||
static const char *arch_info_mips_machines[] = {
|
static const char *const arch_info_mips_machines[] = {
|
||||||
"mips", NULL
|
"mips", NULL
|
||||||
};
|
};
|
||||||
static const char *arch_info_sparc_machines[] = {
|
static const char *const arch_info_sparc_machines[] = {
|
||||||
"sun4m", NULL
|
"sun4m", NULL
|
||||||
};
|
};
|
||||||
static const char *arch_info_ppc_machines[] = {
|
static const char *const arch_info_ppc_machines[] = {
|
||||||
"g3bw", "mac99", "prep", NULL
|
"g3bw", "mac99", "prep", NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Feature flags for the architecture info */
|
/* Feature flags for the architecture info */
|
||||||
struct qemu_feature_flags arch_info_i686_flags [] = {
|
static const struct qemu_feature_flags const arch_info_i686_flags [] = {
|
||||||
{ "pae", 1, 1 },
|
{ "pae", 1, 1 },
|
||||||
{ "acpi", 1, 1 },
|
{ "acpi", 1, 1 },
|
||||||
{ "apic", 1, 0 },
|
{ "apic", 1, 0 },
|
||||||
{ NULL, -1, -1 }
|
{ NULL, -1, -1 }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct qemu_feature_flags arch_info_x86_64_flags [] = {
|
static const struct qemu_feature_flags const arch_info_x86_64_flags [] = {
|
||||||
{ "acpi", 1, 1 },
|
{ "acpi", 1, 1 },
|
||||||
{ "apic", 1, 0 },
|
{ "apic", 1, 0 },
|
||||||
{ NULL, -1, -1 }
|
{ NULL, -1, -1 }
|
||||||
};
|
};
|
||||||
|
|
||||||
/* The archicture tables for supported QEMU archs */
|
/* The archicture tables for supported QEMU archs */
|
||||||
struct qemu_arch_info qemudArchs[] = {
|
const struct qemu_arch_info const qemudArchs[] = {
|
||||||
/* i686 must be in position 0 */
|
/* i686 must be in position 0 */
|
||||||
{ "i686", 32, arch_info_x86_machines, "qemu", arch_info_i686_flags },
|
{ "i686", 32, arch_info_x86_machines, "qemu", arch_info_i686_flags },
|
||||||
/* x86_64 must be in position 1 */
|
/* x86_64 must be in position 1 */
|
||||||
|
@ -426,11 +426,11 @@ struct qemu_feature_flags {
|
|||||||
struct qemu_arch_info {
|
struct qemu_arch_info {
|
||||||
const char *arch;
|
const char *arch;
|
||||||
int wordsize;
|
int wordsize;
|
||||||
const char **machines;
|
const char *const *machines;
|
||||||
const char *binary;
|
const char *binary;
|
||||||
const struct qemu_feature_flags *fflags;
|
const struct qemu_feature_flags *fflags;
|
||||||
};
|
};
|
||||||
extern struct qemu_arch_info qemudArchs[];
|
extern const struct qemu_arch_info const qemudArchs[];
|
||||||
|
|
||||||
#endif /* WITH_QEMU */
|
#endif /* WITH_QEMU */
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ static int qemudShutdownNetworkDaemon(virConnectPtr conn,
|
|||||||
struct qemud_driver *driver,
|
struct qemud_driver *driver,
|
||||||
struct qemud_network *network);
|
struct qemud_network *network);
|
||||||
|
|
||||||
struct qemud_driver *qemu_driver = NULL;
|
static struct qemud_driver *qemu_driver = NULL;
|
||||||
|
|
||||||
|
|
||||||
static
|
static
|
||||||
|
Loading…
x
Reference in New Issue
Block a user