|
@@ -37,6 +37,7 @@
|
|
#include "qemu/queue.h"
|
|
#include "qemu/queue.h"
|
|
#include "qemu/host-utils.h"
|
|
#include "qemu/host-utils.h"
|
|
#include "qemu/base64.h"
|
|
#include "qemu/base64.h"
|
|
|
|
+#include "commands-common.h"
|
|
|
|
|
|
#ifndef SHTDN_REASON_FLAG_PLANNED
|
|
#ifndef SHTDN_REASON_FLAG_PLANNED
|
|
#define SHTDN_REASON_FLAG_PLANNED 0x80000000
|
|
#define SHTDN_REASON_FLAG_PLANNED 0x80000000
|
|
@@ -50,11 +51,11 @@
|
|
|
|
|
|
#define INVALID_SET_FILE_POINTER ((DWORD)-1)
|
|
#define INVALID_SET_FILE_POINTER ((DWORD)-1)
|
|
|
|
|
|
-typedef struct GuestFileHandle {
|
|
|
|
|
|
+struct GuestFileHandle {
|
|
int64_t id;
|
|
int64_t id;
|
|
HANDLE fh;
|
|
HANDLE fh;
|
|
QTAILQ_ENTRY(GuestFileHandle) next;
|
|
QTAILQ_ENTRY(GuestFileHandle) next;
|
|
-} GuestFileHandle;
|
|
|
|
|
|
+};
|
|
|
|
|
|
static struct {
|
|
static struct {
|
|
QTAILQ_HEAD(, GuestFileHandle) filehandles;
|
|
QTAILQ_HEAD(, GuestFileHandle) filehandles;
|
|
@@ -126,7 +127,7 @@ static int64_t guest_file_handle_add(HANDLE fh, Error **errp)
|
|
return handle;
|
|
return handle;
|
|
}
|
|
}
|
|
|
|
|
|
-static GuestFileHandle *guest_file_handle_find(int64_t id, Error **errp)
|
|
|
|
|
|
+GuestFileHandle *guest_file_handle_find(int64_t id, Error **errp)
|
|
{
|
|
{
|
|
GuestFileHandle *gfh;
|
|
GuestFileHandle *gfh;
|
|
QTAILQ_FOREACH(gfh, &guest_file_state.filehandles, next) {
|
|
QTAILQ_FOREACH(gfh, &guest_file_state.filehandles, next) {
|