balloon: Make functions, local vars static
balloon.h had function declarations for a couple of functions that are local to balloon.c. Make them static. Drop the 'qemu_' prefix for balloon.c-local variables, and make them static. Signed-off-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
		
							parent
							
								
									a6f4e09d90
								
							
						
					
					
						commit
						0a2a30d5ad
					
				
							
								
								
									
										22
									
								
								balloon.c
								
								
								
								
							
							
						
						
									
										22
									
								
								balloon.c
								
								
								
								
							| 
						 | 
				
			
			@ -31,30 +31,30 @@
 | 
			
		|||
#include "trace.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static QEMUBalloonEvent *qemu_balloon_event;
 | 
			
		||||
void *qemu_balloon_event_opaque;
 | 
			
		||||
static QEMUBalloonEvent *balloon_event_fn;
 | 
			
		||||
static void *balloon_opaque;
 | 
			
		||||
 | 
			
		||||
void qemu_add_balloon_handler(QEMUBalloonEvent *func, void *opaque)
 | 
			
		||||
{
 | 
			
		||||
    qemu_balloon_event = func;
 | 
			
		||||
    qemu_balloon_event_opaque = opaque;
 | 
			
		||||
    balloon_event_fn = func;
 | 
			
		||||
    balloon_opaque = opaque;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int qemu_balloon(ram_addr_t target, MonitorCompletion cb, void *opaque)
 | 
			
		||||
static int qemu_balloon(ram_addr_t target, MonitorCompletion cb, void *opaque)
 | 
			
		||||
{
 | 
			
		||||
    if (qemu_balloon_event) {
 | 
			
		||||
        trace_balloon_event(qemu_balloon_event_opaque, target);
 | 
			
		||||
        qemu_balloon_event(qemu_balloon_event_opaque, target, cb, opaque);
 | 
			
		||||
    if (balloon_event_fn) {
 | 
			
		||||
        trace_balloon_event(balloon_opaque, target);
 | 
			
		||||
        balloon_event_fn(balloon_opaque, target, cb, opaque);
 | 
			
		||||
        return 1;
 | 
			
		||||
    } else {
 | 
			
		||||
        return 0;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int qemu_balloon_status(MonitorCompletion cb, void *opaque)
 | 
			
		||||
static int qemu_balloon_status(MonitorCompletion cb, void *opaque)
 | 
			
		||||
{
 | 
			
		||||
    if (qemu_balloon_event) {
 | 
			
		||||
        qemu_balloon_event(qemu_balloon_event_opaque, 0, cb, opaque);
 | 
			
		||||
    if (balloon_event_fn) {
 | 
			
		||||
        balloon_event_fn(balloon_opaque, 0, cb, opaque);
 | 
			
		||||
        return 1;
 | 
			
		||||
    } else {
 | 
			
		||||
        return 0;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -21,10 +21,6 @@ typedef void (QEMUBalloonEvent)(void *opaque, ram_addr_t target,
 | 
			
		|||
 | 
			
		||||
void qemu_add_balloon_handler(QEMUBalloonEvent *func, void *opaque);
 | 
			
		||||
 | 
			
		||||
int qemu_balloon(ram_addr_t target, MonitorCompletion cb, void *opaque);
 | 
			
		||||
 | 
			
		||||
int qemu_balloon_status(MonitorCompletion cb, void *opaque);
 | 
			
		||||
 | 
			
		||||
void monitor_print_balloon(Monitor *mon, const QObject *data);
 | 
			
		||||
int do_info_balloon(Monitor *mon, MonitorCompletion cb, void *opaque);
 | 
			
		||||
int do_balloon(Monitor *mon, const QDict *params,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue