Commit bb64885d authored by Keir Fraser's avatar Keir Fraser

tools: Declare functions static where they should be, and provide

proper prototypes for others as required.
Signed-off-by: default avatarChristoph Egger <Christoph.Egger@amd.com>
parent 0c6925d7
......@@ -471,7 +471,7 @@ out:
}
/* Takes tuples of names, scanf-style args, and void **, NULL terminated. */
int xs_gather(struct xs_handle *xs, const char *dir, ...)
static int xs_gather(struct xs_handle *xs, const char *dir, ...)
{
va_list ap;
const char *name;
......
......@@ -99,10 +99,6 @@ asm (
" .text \n"
);
void smp_initialise(void);
void create_mp_tables(void);
int hvm_write_smbios_tables(void);
static enum { VGA_none, VGA_std, VGA_cirrus } virtual_vga = VGA_none;
static void
......
......@@ -69,8 +69,6 @@
#include "util.h"
extern int get_vcpu_nr(void); /* for the guest's VCPU count */
/*
* The following structures are defined in the MuliProcessor Specifiation v1.4
*/
......@@ -152,7 +150,7 @@ struct mp_local_intr_entry {
};
void fill_mp_config_table(struct mp_config_table *mpct, int length)
static void fill_mp_config_table(struct mp_config_table *mpct, int length)
{
int vcpu_nr, i;
uint8_t checksum;
......@@ -199,7 +197,7 @@ void fill_mp_config_table(struct mp_config_table *mpct, int length)
}
/* fills in an MP processor entry for VCPU 'vcpu_id' */
void fill_mp_proc_entry(struct mp_proc_entry *mppe, int vcpu_id)
static void fill_mp_proc_entry(struct mp_proc_entry *mppe, int vcpu_id)
{
mppe->type = ENTRY_TYPE_PROCESSOR;
mppe->lapic_id = LAPIC_ID(vcpu_id);
......@@ -213,7 +211,7 @@ void fill_mp_proc_entry(struct mp_proc_entry *mppe, int vcpu_id)
/* fills in an MP bus entry of type 'type' and bus ID 'bus_id' */
void fill_mp_bus_entry(struct mp_bus_entry *mpbe, int bus_id, const char *type)
static void fill_mp_bus_entry(struct mp_bus_entry *mpbe, int bus_id, const char *type)
{
int i;
......@@ -225,7 +223,7 @@ void fill_mp_bus_entry(struct mp_bus_entry *mpbe, int bus_id, const char *type)
/* fills in an MP IOAPIC entry for IOAPIC 'ioapic_id' */
void fill_mp_ioapic_entry(struct mp_ioapic_entry *mpie)
static void fill_mp_ioapic_entry(struct mp_ioapic_entry *mpie)
{
mpie->type = ENTRY_TYPE_IOAPIC;
mpie->ioapic_id = IOAPIC_ID;
......@@ -236,7 +234,7 @@ void fill_mp_ioapic_entry(struct mp_ioapic_entry *mpie)
/* fills in an IO interrupt entry for IOAPIC 'ioapic_id' */
void fill_mp_io_intr_entry(
static void fill_mp_io_intr_entry(
struct mp_io_intr_entry *mpiie,
int src_bus_id, int src_bus_irq, int ioapic_id, int dst_ioapic_intin)
{
......@@ -251,7 +249,7 @@ void fill_mp_io_intr_entry(
/* fill in the mp floating processor structure */
void fill_mpfps(struct mp_floating_pointer_struct *mpfps, uint32_t mpct)
static void fill_mpfps(struct mp_floating_pointer_struct *mpfps, uint32_t mpct)
{
int i;
uint8_t checksum;
......@@ -283,7 +281,7 @@ void fill_mpfps(struct mp_floating_pointer_struct *mpfps, uint32_t mpct)
* The '___HVMMP' signature is created by the ROMBIOS and designates a chunk
* of space inside the ROMBIOS that is safe for us to write our MP table info
*/
void* get_mp_table_start(void)
static void *get_mp_table_start(void)
{
char *bios_mem;
......@@ -300,7 +298,7 @@ void* get_mp_table_start(void)
/* recalculate the new ROMBIOS checksum after adding MP tables */
void reset_bios_checksum(void)
static void reset_bios_checksum(void)
{
uint32_t i;
uint8_t checksum;
......@@ -312,7 +310,6 @@ void reset_bios_checksum(void)
*((uint8_t *)(ROMBIOS_BEGIN + ROMBIOS_MAXOFFSET)) = -checksum;
}
/* create_mp_tables - creates MP tables for the guest based upon config data */
void create_mp_tables(void)
{
......
......@@ -69,8 +69,7 @@ asm (
" .text \n"
);
extern void cacheattr_init(void);
void ap_start(void); /* non-static avoids unused-function compiler warning */
/*static*/ void ap_start(void)
{
printf(" - CPU%d ... ", ap_cpuid);
......
......@@ -137,6 +137,12 @@ uint32_t e820_malloc(uint32_t size);
/* Prepare the 32bit BIOS */
void highbios_setup(void);
/* Miscellaneous. */
void cacheattr_init(void);
void create_mp_tables(void);
int hvm_write_smbios_tables(void);
void smp_initialise(void);
#define isdigit(c) ((c) >= '0' && (c) <= '9')
#endif /* __HVMLOADER_UTIL_H__ */
......@@ -581,7 +581,7 @@ static char wake_event_1[] = "Wake Event 1";
* data : additional parameter; used as parameter for 10.4.3
* 'action index'
*/
void tcpa_add_measurement(uint32_t pcrIndex,
static void tcpa_add_measurement(uint32_t pcrIndex,
uint16_t event_type,
uint32_t data)
{
......@@ -863,7 +863,7 @@ uint32_t tcpa_initialize_tpm(uint32_t physpres)
}
uint16_t TCG_IsShutdownPreBootInterface(void)
static uint16_t TCG_IsShutdownPreBootInterface(void)
{
return tcpa_acpi.flags & STATUS_FLAG_SHUTDOWN;
}
......
......@@ -75,7 +75,7 @@ static uint32_t tis_activate(uint32_t baseaddr)
return rc;
}
uint32_t tis_ready(uint32_t baseaddr)
static uint32_t tis_ready(uint32_t baseaddr)
{
uint32_t rc = 0;
uint8_t *tis_addr = (uint8_t*)baseaddr;
......@@ -86,7 +86,7 @@ uint32_t tis_ready(uint32_t baseaddr)
return rc;
}
uint32_t tis_senddata(uint32_t baseaddr, unsigned char *data, uint32_t len)
static uint32_t tis_senddata(uint32_t baseaddr, unsigned char *data, uint32_t len)
{
uint32_t rc = 0;
uint8_t *tis_addr = (uint8_t*)baseaddr;
......@@ -127,7 +127,7 @@ uint32_t tis_senddata(uint32_t baseaddr, unsigned char *data, uint32_t len)
return rc;
}
uint32_t tis_readresp(uint32_t baseaddr, unsigned char *buffer, uint32_t len)
static uint32_t tis_readresp(uint32_t baseaddr, unsigned char *buffer, uint32_t len)
{
uint32_t rc = 0;
uint32_t offset = 0;
......@@ -147,7 +147,7 @@ uint32_t tis_readresp(uint32_t baseaddr, unsigned char *buffer, uint32_t len)
}
uint32_t tis_waitdatavalid(uint32_t baseaddr)
static uint32_t tis_waitdatavalid(uint32_t baseaddr)
{
uint8_t *tis_addr = (uint8_t*)baseaddr;
uint32_t rc = 0;
......@@ -157,7 +157,7 @@ uint32_t tis_waitdatavalid(uint32_t baseaddr)
return rc;
}
uint32_t tis_waitrespready(uint32_t baseaddr, uint32_t timeout)
static uint32_t tis_waitrespready(uint32_t baseaddr, uint32_t timeout)
{
uint32_t rc = 0;
uint8_t *tis_addr = (uint8_t*)baseaddr;
......@@ -170,7 +170,7 @@ uint32_t tis_waitrespready(uint32_t baseaddr, uint32_t timeout)
}
/* if device is not there, return '0', '1' otherwise */
uint32_t tis_probe(uint32_t baseaddr)
static uint32_t tis_probe(uint32_t baseaddr)
{
uint32_t rc = 0;
uint8_t *tis_addr = (uint8_t*)baseaddr;
......
......@@ -388,12 +388,6 @@ int printf(const char *fmt, ...)
return 0;
}
int vprintf(const char *fmt, va_list ap)
{
_doprint(putchar, fmt, ap);
return 0;
}
void mssleep(uint32_t waittime)
{
uint32_t i;
......
......@@ -104,14 +104,20 @@ int *running = NULL;
int NCPU = 0;
void init_current(int ncpu)
static void advance_next_datapoint(uint64_t);
static void alloc_qos_data(int ncpu);
static int process_record(int, struct t_rec *);
static void qos_kill_thread(int domid);
static void init_current(int ncpu)
{
running = calloc(ncpu, sizeof(int));
NCPU = ncpu;
printf("Initialized with %d %s\n", ncpu, (ncpu == 1) ? "cpu" : "cpu's");
}
int is_current(int domain, int cpu)
static int is_current(int domain, int cpu)
{
// int i;
......@@ -122,20 +128,22 @@ int is_current(int domain, int cpu)
}
#if 0 /* unused */
// return the domain that's currently running on the given cpu
int current(int cpu)
static int current(int cpu)
{
return running[cpu];
}
#endif
void set_current(int cpu, int domain)
static void set_current(int cpu, int domain)
{
running[cpu] = domain;
}
void close_handler(int signal)
static void close_handler(int signal)
{
interrupted = 1;
}
......@@ -152,7 +160,7 @@ void dump_record(int cpu, struct t_rec *x)
* millis_to_timespec - convert a time in milliseconds to a struct timespec
* @millis: time interval in milliseconds
*/
struct timespec millis_to_timespec(unsigned long millis)
static struct timespec millis_to_timespec(unsigned long millis)
{
struct timespec spec;
......@@ -188,7 +196,7 @@ stat_map_t stat_map[] = {
};
void check_gotten_sum(void)
static void check_gotten_sum(void)
{
#if 0
uint64_t sum, ns;
......@@ -212,7 +220,7 @@ void check_gotten_sum(void)
void dump_stats(void)
static void dump_stats(void)
{
stat_map_t *smt = stat_map;
time_t end_time, run_time;
......@@ -236,7 +244,7 @@ void dump_stats(void)
check_gotten_sum();
}
void log_event(int event_id)
static void log_event(int event_id)
{
stat_map_t *smt = stat_map;
......@@ -258,7 +266,7 @@ int xce_handle = -1;
/* Returns the event channel handle. */
/* Stolen from xenstore code */
int eventchn_init(void)
static int eventchn_init(void)
{
int rc;
......@@ -278,7 +286,7 @@ int eventchn_init(void)
return xce_handle;
}
void wait_for_event(void)
static void wait_for_event(void)
{
int ret;
fd_set inset;
......@@ -333,7 +341,7 @@ static void get_tbufs(unsigned long *mfn, unsigned long *size)
xc_interface_close(xc_handle);
}
void disable_tracing(void)
static void disable_tracing(void)
{
int xc_handle = xc_interface_open();
xc_tbuf_disable(xc_handle);
......@@ -348,7 +356,7 @@ void disable_tracing(void)
*
* Maps the Xen trace buffers them into process address space.
*/
struct t_buf *map_tbufs(unsigned long tbufs_mfn, unsigned int num,
static struct t_buf *map_tbufs(unsigned long tbufs_mfn, unsigned int num,
unsigned long size)
{
int xc_handle;
......@@ -385,7 +393,7 @@ struct t_buf *map_tbufs(unsigned long tbufs_mfn, unsigned int num,
* Initialises an array of pointers to individual trace buffers within the
* mapped region containing all trace buffers.
*/
struct t_buf **init_bufs_ptrs(void *bufs_mapped, unsigned int num,
static struct t_buf **init_bufs_ptrs(void *bufs_mapped, unsigned int num,
unsigned long size)
{
int i;
......@@ -418,7 +426,7 @@ struct t_buf **init_bufs_ptrs(void *bufs_mapped, unsigned int num,
* mapped in user space. Note that the trace buffer metadata contains machine
* pointers - the array returned allows more convenient access to them.
*/
struct t_rec **init_rec_ptrs(struct t_buf **meta, unsigned int num)
static struct t_rec **init_rec_ptrs(struct t_buf **meta, unsigned int num)
{
int i;
struct t_rec **data;
......@@ -441,7 +449,7 @@ struct t_rec **init_rec_ptrs(struct t_buf **meta, unsigned int num)
/**
* get_num_cpus - get the number of logical CPUs
*/
unsigned int get_num_cpus(void)
static unsigned int get_num_cpus(void)
{
xc_physinfo_t physinfo = { 0 };
int xc_handle = xc_interface_open();
......@@ -465,11 +473,9 @@ unsigned int get_num_cpus(void)
/**
* monitor_tbufs - monitor the contents of tbufs
*/
int monitor_tbufs(void)
static int monitor_tbufs(void)
{
int i;
extern int process_record(int, struct t_rec *);
extern void alloc_qos_data(int ncpu);
void *tbufs_mapped; /* pointer to where the tbufs are mapped */
struct t_buf **meta; /* pointers to the trace buffer metadata */
......@@ -564,7 +570,7 @@ const char *program_bug_address = "<rob.gardner@hp.com>";
#define xstr(x) str(x)
#define str(x) #x
void usage(void)
static void usage(void)
{
#define USAGE_STR \
"Usage: xenbaked [OPTION...]\n" \
......@@ -591,7 +597,7 @@ void usage(void)
}
/* convert the argument string pointed to by arg to a long int representation */
long argtol(const char *restrict arg, int base)
static long argtol(const char *restrict arg, int base)
{
char *endp;
long val;
......@@ -612,7 +618,7 @@ long argtol(const char *restrict arg, int base)
}
/* parse command line arguments */
void parse_args(int argc, char **argv)
static void parse_args(int argc, char **argv)
{
int option;
static struct option long_options[] = {
......@@ -658,12 +664,11 @@ void parse_args(int argc, char **argv)
}
#define SHARED_MEM_FILE "/var/run/xenq-shm"
void alloc_qos_data(int ncpu)
static void alloc_qos_data(int ncpu)
{
int i, n, pgsize, off=0;
char *dummy;
int qos_fd;
void advance_next_datapoint(uint64_t);
cpu_qos_data = (_new_qos_data **) calloc(ncpu, sizeof(_new_qos_data *));
......@@ -737,7 +742,7 @@ int main(int argc, char **argv)
return ret;
}
void qos_init_domain(int domid, int idx)
static void qos_init_domain(int domid, int idx)
{
int i;
......@@ -767,7 +772,7 @@ void qos_init_domain(int domid, int idx)
}
}
void global_init_domain(int domid, int idx)
static void global_init_domain(int domid, int idx)
{
int cpu;
_new_qos_data *saved_qos;
......@@ -781,14 +786,12 @@ void global_init_domain(int domid, int idx)
new_qos = saved_qos;
}
// give index of this domain in the qos data array
int indexof(int domid)
static int indexof(int domid)
{
int idx;
xc_dominfo_t dominfo[NDOMAINS];
int xc_handle, ndomains;
extern void qos_kill_thread(int domid);
if (domid < 0) { // shouldn't happen
printf("bad domain id: %d\r\n", domid);
......@@ -840,13 +843,13 @@ int indexof(int domid)
exit(2);
}
int domain_runnable(int domid)
static int domain_runnable(int domid)
{
return new_qos->domain_info[indexof(domid)].runnable;
}
void update_blocked_time(int domid, uint64_t now)
static void update_blocked_time(int domid, uint64_t now)
{
uint64_t t_blocked;
int id = indexof(domid);
......@@ -867,7 +870,7 @@ void update_blocked_time(int domid, uint64_t now)
// advance to next datapoint for all domains
void advance_next_datapoint(uint64_t now)
static void advance_next_datapoint(uint64_t now)
{
int new, old, didx;
......@@ -892,7 +895,7 @@ void advance_next_datapoint(uint64_t now)
void qos_update_thread(int cpu, int domid, uint64_t now)
static void qos_update_thread(int cpu, int domid, uint64_t now)
{
int n, id;
uint64_t last_update_time, start;
......@@ -970,7 +973,7 @@ void qos_update_thread(int cpu, int domid, uint64_t now)
// called by dump routines to update all structures
void qos_update_all(uint64_t now, int cpu)
static void qos_update_all(uint64_t now, int cpu)
{
int i;
......@@ -980,7 +983,7 @@ void qos_update_all(uint64_t now, int cpu)
}
void qos_update_thread_stats(int cpu, int domid, uint64_t now)
static void qos_update_thread_stats(int cpu, int domid, uint64_t now)
{
if (new_qos->qdata[new_qos->next_datapoint].ns_passed > (million*opts.ms_per_sample)) {
qos_update_all(now, cpu);
......@@ -993,7 +996,7 @@ void qos_update_thread_stats(int cpu, int domid, uint64_t now)
// called when a new thread gets the cpu
void qos_switch_in(int cpu, int domid, uint64_t now, unsigned long ns_alloc, unsigned long ns_waited)
static void qos_switch_in(int cpu, int domid, uint64_t now, unsigned long ns_alloc, unsigned long ns_waited)
{
int idx = indexof(domid);
......@@ -1016,7 +1019,7 @@ void qos_switch_in(int cpu, int domid, uint64_t now, unsigned long ns_alloc, uns
}
// called when the current thread is taken off the cpu
void qos_switch_out(int cpu, int domid, uint64_t now, unsigned long gotten)
static void qos_switch_out(int cpu, int domid, uint64_t now, unsigned long gotten)
{
int idx = indexof(domid);
int n;
......@@ -1054,7 +1057,7 @@ void qos_switch_out(int cpu, int domid, uint64_t now, unsigned long gotten)
// called when domain is put to sleep, may also be called
// when thread is already asleep
void qos_state_sleeping(int cpu, int domid, uint64_t now)
static void qos_state_sleeping(int cpu, int domid, uint64_t now)
{
int idx;
......@@ -1072,7 +1075,7 @@ void qos_state_sleeping(int cpu, int domid, uint64_t now)
// domain died, presume it's dead on all cpu's, not just mostly dead
void qos_kill_thread(int domid)
static void qos_kill_thread(int domid)
{
int cpu;
......@@ -1085,7 +1088,7 @@ void qos_kill_thread(int domid)
// called when thread becomes runnable, may also be called
// when thread is already runnable
void qos_state_runnable(int cpu, int domid, uint64_t now)
static void qos_state_runnable(int cpu, int domid, uint64_t now)
{
int idx;
......@@ -1105,7 +1108,7 @@ void qos_state_runnable(int cpu, int domid, uint64_t now)
}
void qos_count_packets(domid_t domid, uint64_t now)
static void qos_count_packets(domid_t domid, uint64_t now)
{
int i, idx = indexof(domid);
_new_qos_data *cpu_data;
......@@ -1122,7 +1125,7 @@ void qos_count_packets(domid_t domid, uint64_t now)
}
int process_record(int cpu, struct t_rec *r)
static int process_record(int cpu, struct t_rec *r)
{
uint64_t now = 0;
uint32_t *extra_u32 = r->u.nocycles.extra_u32;
......
......@@ -500,7 +500,7 @@ void *talloc_init(const char *fmt, ...)
should probably not be used in new code. It's in here to keep the talloc
code consistent across Samba 3 and 4.
*/
void talloc_free_children(void *ptr)
static void talloc_free_children(void *ptr)
{
struct talloc_chunk *tc;
......
......@@ -28,7 +28,7 @@
#ifndef _SAMBA_BUILD_
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
......@@ -731,7 +731,7 @@ update:
static int expand_file(TDB_CONTEXT *tdb, tdb_off size, tdb_off addition)
{
char buf[1024];
#if HAVE_FTRUNCATE_EXTEND
#ifdef HAVE_FTRUNCATE_EXTEND
if (ftruncate(tdb->fd, size+addition) != 0) {
TDB_LOG((tdb, 0, "expand_file ftruncate to %d failed (%s)\n",
size+addition, strerror(errno)));
......
......@@ -121,7 +121,7 @@ static int show_whole_path = 0;
#define MIN(a, b) (((a) < (b))? (a) : (b))
void do_ls(struct xs_handle *h, char *path, int cur_depth, int show_perms)
static void do_ls(struct xs_handle *h, char *path, int cur_depth, int show_perms)
{
static struct expanding_buffer ebuf;
char **e;
......
......@@ -349,23 +349,6 @@ static int destroy_fd(void *_fd)
return 0;
}
/* Return a pointer to an fd, self-closing and attached to this pathname. */
int *talloc_open(const char *pathname, int flags, int mode)
{
int *fd;
fd = talloc(pathname, int);
*fd = open(pathname, flags, mode);
if (*fd < 0) {
int saved_errno = errno;
talloc_free(fd);
errno = saved_errno;
return NULL;
}
talloc_set_destructor(fd, destroy_fd);
return fd;
}
/* Is child a subnode of parent, or equal? */
bool is_child(const char *child, const char *parent)
{
......
......@@ -71,7 +71,7 @@ struct symbol {
size_t kernel_stext, kernel_etext, kernel_sinittext, kernel_einittext, kernel_hypercallpage;
int is_kernel_text(size_t addr)
static int is_kernel_text(size_t addr)
{
#if defined (__i386__)
if (symbol_table == NULL)
......@@ -96,7 +96,8 @@ int is_kernel_text(size_t addr)
return 0;
}
void free_symbol(struct symbol *symbol)
#if 0
static void free_symbol(struct symbol *symbol)
{
if (symbol == NULL)
return;
......@@ -104,8 +105,9 @@ void free_symbol(struct symbol *symbol)
free(symbol->name);
free(symbol);
}
#endif
void insert_symbol(struct symbol *symbol)
static void insert_symbol(struct symbol *symbol)
{
static struct symbol *prev = NULL;
struct symbol *s = symbol_table;
......@@ -132,7 +134,7 @@ void insert_symbol(struct symbol *symbol)
prev = symbol;
}
struct symbol *lookup_symbol(size_t address)
static struct symbol *lookup_symbol(size_t address)
{
struct symbol *s = symbol_table;
......@@ -145,7 +147,7 @@ struct symbol *lookup_symbol(size_t address)
return NULL;
}
void print_symbol(size_t addr)
static void print_symbol(size_t addr)
{
struct symbol *s;
......@@ -163,7 +165,7 @@ void print_symbol(size_t addr)
printf("%s+%#x ", s->name, (unsigned int)(addr - s->address));
}
void read_symbol_table(const char *symtab)
static void read_symbol_table(const char *symtab)
{
char line[256];
char *p;
......@@ -240,7 +242,7 @@ char *flag_values[22][2] =
{ NULL, "cid" } // 21 Cpuid Identification Flag
};
void print_flags(uint64_t flags)
static void print_flags(uint64_t flags)
{
int i;
......@@ -253,7 +255,7 @@ void print_flags(uint64_t flags)
printf("\n");
}
void print_special(unsigned long *regs, const char *name, unsigned int mask)
static void print_special(unsigned long *regs, const char *name, unsigned int mask)
{
unsigned int i;
......@@ -265,7 +267,7 @@ void print_special(unsigned long *regs, const char *name, unsigned int mask)
#endif
#ifdef __i386__
void print_ctx(vcpu_guest_context_t *ctx1)
static void print_ctx(vcpu_guest_context_t *ctx1)
{
struct cpu_user_regs *regs = &ctx1->user_regs;
......@@ -294,7 +296,7 @@ void print_ctx(vcpu_guest_context_t *ctx1)
}
}
#elif defined(__x86_64__)
void print_ctx(vcpu_guest_context_t *ctx1)
static void print_ctx(vcpu_guest_context_t *ctx1)
{
struct cpu_user_regs *regs = &ctx1->user_regs;
......@@ -582,7 +584,7 @@ void print_ctx(vcpu_guest_context_t *ctx)
#endif
#ifndef NO_TRANSLATION
void *map_page(vcpu_guest_context_t *ctx, int vcpu, size_t virt)
static void *map_page(vcpu_guest_context_t *ctx, int vcpu, size_t virt)
{
static unsigned long previous_mfn = 0;
static void *mapped = NULL;
......@@ -609,7 +611,7 @@ void *map_page(vcpu_guest_context_t *ctx, int vcpu, size_t virt)
return (void *)(mapped + offset);
}
void print_stack(vcpu_guest_context_t *ctx, int vcpu)
static void print_stack(vcpu_guest_context_t *ctx, int vcpu)
{
struct cpu_user_regs *regs = &ctx->user_regs;
size_t stack = STACK_POINTER(regs);
......@@ -699,7 +701,7 @@ void print_stack(vcpu_guest_context_t *ctx, int vcpu)
}
#endif
void dump_ctx(int vcpu)
static void dump_ctx(int vcpu)
{
int ret;
vcpu_guest_context_any_t ctx;
......@@ -748,7 +750,7 @@ void dump_ctx(int vcpu)
}
}
void usage(void)
static void usage(void)
{
printf("usage:\n\n");
......
......@@ -68,7 +68,7 @@ static int xc_handle = -1;
static int event_fd = -1;
static int virq_port = -1;
void close_handler(int signal)
static void close_handler(int signal)
{
interrupted = 1;
}
......@@ -84,7 +84,7 @@ void close_handler(int signal)
* Outputs the trace buffer to a filestream, prepending the CPU and size
* of the buffer write.
*/
void write_buffer(unsigned int cpu, unsigned char *start, int size,
static void write_buffer(unsigned int cpu, unsigned char *start, int size,
int total_size, int outfd)
{
struct statvfs stat;
......@@ -206,7 +206,7 @@ static void get_tbufs(unsigned long *mfn, unsigned long *size)