qemu/qga/vss-win32/requester.h
Chen Hanxiao 0692b03ee1 qga-win: add support for qmp_guest_fsfreeze_freeze_list
This patch add support for freeze specified fs.

The valid mountpoints list member are [1]:

  The path of a mounted folder, for example, Y:\MountX\
  A drive letter, for example, D:\
  A volume GUID path of the form \\?\Volume{GUID}\,
      where GUID identifies the volume
  A UNC path that specifies a remote file share,
      for example, \\Clusterx\Share1\

[1] https://docs.microsoft.com/en-us/windows/desktop/api/vsbackup/nf-vsbackup-ivssbackupcomponents-addtosnapshotset

Cc: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2018-10-30 16:48:49 -05:00

53 lines
1.3 KiB
C

/*
* QEMU Guest Agent VSS requester declarations
*
* Copyright Hitachi Data Systems Corp. 2013
*
* Authors:
* Tomoki Sekiyama <tomoki.sekiyama@hds.com>
*
* This work is licensed under the terms of the GNU GPL, version 2 or later.
* See the COPYING file in the top-level directory.
*/
#ifndef VSS_WIN32_REQUESTER_H
#define VSS_WIN32_REQUESTER_H
#include <basetyps.h> /* STDAPI */
#ifdef __cplusplus
extern "C" {
#endif
struct Error;
/* Callback to set Error; used to avoid linking glib to the DLL */
typedef void (*ErrorSetFunc)(struct Error **errp,
const char *src, int line, const char *func,
int win32_err, const char *fmt, ...)
GCC_FMT_ATTR(6, 7);
typedef struct ErrorSet {
ErrorSetFunc error_setg_win32_wrapper;
struct Error **errp; /* restriction: must not be null */
} ErrorSet;
STDAPI requester_init(void);
STDAPI requester_deinit(void);
typedef struct volList volList;
struct volList {
volList *next;
char *value;
};
typedef void (*QGAVSSRequesterFunc)(int *, void *, ErrorSet *);
void requester_freeze(int *num_vols, void *volList, ErrorSet *errset);
void requester_thaw(int *num_vols, void *volList, ErrorSet *errset);
#ifdef __cplusplus
}
#endif
#endif