Revision fd42deeb vl.c
b/vl.c | ||
---|---|---|
234 | 234 |
static QEMUBootSetHandler *boot_set_handler; |
235 | 235 |
static void *boot_set_opaque; |
236 | 236 |
|
237 |
static NotifierList exit_notifiers = |
|
238 |
NOTIFIER_LIST_INITIALIZER(exit_notifiers); |
|
239 |
|
|
237 | 240 |
int kvm_allowed = 0; |
238 | 241 |
uint32_t xen_domid; |
239 | 242 |
enum xen_mode xen_mode = XEN_EMULATE; |
... | ... | |
1740 | 1743 |
return 0; |
1741 | 1744 |
} |
1742 | 1745 |
|
1746 |
void qemu_add_exit_notifier(Notifier *notify) |
|
1747 |
{ |
|
1748 |
notifier_list_add(&exit_notifiers, notify); |
|
1749 |
} |
|
1750 |
|
|
1751 |
void qemu_remove_exit_notifier(Notifier *notify) |
|
1752 |
{ |
|
1753 |
notifier_list_remove(&exit_notifiers, notify); |
|
1754 |
} |
|
1755 |
|
|
1756 |
static void qemu_run_exit_notifiers(void) |
|
1757 |
{ |
|
1758 |
notifier_list_notify(&exit_notifiers); |
|
1759 |
} |
|
1760 |
|
|
1743 | 1761 |
static const QEMUOption *lookup_opt(int argc, char **argv, |
1744 | 1762 |
const char **poptarg, int *poptind) |
1745 | 1763 |
{ |
... | ... | |
1804 | 1822 |
int show_vnc_port = 0; |
1805 | 1823 |
int defconfig = 1; |
1806 | 1824 |
|
1825 |
atexit(qemu_run_exit_notifiers); |
|
1807 | 1826 |
error_set_progname(argv[0]); |
1808 | 1827 |
|
1809 | 1828 |
init_clocks(); |
Also available in: Unified diff