Debian 5.0.8 does not define FIFREEZE. Disentangle CONFIG_FSFREEZE from __linux__.
Signed-off-by: Richard Henderson <r...@twiddle.net> Cc: Luiz Capitulino <lcapitul...@redhat.com> Cc: Michael Roth <mdr...@linux.vnet.ibm.com> --- qga/commands-posix.c | 48 ++++++++++++++++++++++-------------------------- 1 files changed, 22 insertions(+), 26 deletions(-) diff --git a/qga/commands-posix.c b/qga/commands-posix.c index faf970d..83b400d 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -312,8 +312,6 @@ static void guest_file_init(void) } /* linux-specific implementations. avoid this if at all possible. */ -#if defined(__linux__) - #if defined(CONFIG_FSFREEZE) static void disable_logging(void) @@ -511,8 +509,30 @@ static void guest_fsfreeze_cleanup(void) } } } +#else /* defined(CONFIG_FSFREEZE) */ +GuestFsfreezeStatus qmp_guest_fsfreeze_status(Error **err) +{ + error_set(err, QERR_UNSUPPORTED); + + return 0; +} + +int64_t qmp_guest_fsfreeze_freeze(Error **err) +{ + error_set(err, QERR_UNSUPPORTED); + + return 0; +} + +int64_t qmp_guest_fsfreeze_thaw(Error **err) +{ + error_set(err, QERR_UNSUPPORTED); + + return 0; +} #endif /* CONFIG_FSFREEZE */ +#if defined(__linux__) #define LINUX_SYS_STATE_FILE "/sys/power/state" #define SUSPEND_SUPPORTED 0 #define SUSPEND_NOT_SUPPORTED 1 @@ -878,30 +898,7 @@ error: qapi_free_GuestNetworkInterfaceList(head); return NULL; } - #else /* defined(__linux__) */ - -GuestFsfreezeStatus qmp_guest_fsfreeze_status(Error **err) -{ - error_set(err, QERR_UNSUPPORTED); - - return 0; -} - -int64_t qmp_guest_fsfreeze_freeze(Error **err) -{ - error_set(err, QERR_UNSUPPORTED); - - return 0; -} - -int64_t qmp_guest_fsfreeze_thaw(Error **err) -{ - error_set(err, QERR_UNSUPPORTED); - - return 0; -} - void qmp_guest_suspend_disk(Error **err) { error_set(err, QERR_UNSUPPORTED); @@ -922,7 +919,6 @@ GuestNetworkInterfaceList *qmp_guest_network_get_interfaces(Error **errp) error_set(errp, QERR_UNSUPPORTED); return NULL; } - #endif /* register init/cleanup routines for stateful command groups */ -- 1.7.7.6