mirror of
https://github.com/mii443/qemu.git
synced 2025-12-16 17:18:49 +00:00
qga: drop guest_file_init helper and replace it with static initializers
This just makes code shorter and better. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: Yuri Pudgorodskiy <yur@virtuozzo.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
This commit is contained in:
committed by
Michael Roth
parent
62c39b307b
commit
b4fe97c823
@@ -55,7 +55,9 @@ typedef struct GuestFileHandle {
|
||||
|
||||
static struct {
|
||||
QTAILQ_HEAD(, GuestFileHandle) filehandles;
|
||||
} guest_file_state;
|
||||
} guest_file_state = {
|
||||
.filehandles = QTAILQ_HEAD_INITIALIZER(guest_file_state.filehandles),
|
||||
};
|
||||
|
||||
|
||||
typedef struct OpenFlags {
|
||||
@@ -390,11 +392,6 @@ void qmp_guest_file_flush(int64_t handle, Error **errp)
|
||||
}
|
||||
}
|
||||
|
||||
static void guest_file_init(void)
|
||||
{
|
||||
QTAILQ_INIT(&guest_file_state.filehandles);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_QGA_NTDDSCSI
|
||||
|
||||
static STORAGE_BUS_TYPE win2qemu[] = {
|
||||
@@ -1330,5 +1327,4 @@ void ga_command_state_init(GAState *s, GACommandState *cs)
|
||||
if (!vss_initialized()) {
|
||||
ga_command_state_add(cs, NULL, guest_fsfreeze_cleanup);
|
||||
}
|
||||
ga_command_state_add(cs, guest_file_init, NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user