aboutsummaryrefslogtreecommitdiff
path: root/qga
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-07-23 16:14:37 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2011-07-23 18:24:05 -0500
commit4eb36d40da8062400a2e7e27f1038e1252df9ede (patch)
tree18604c3423e74e5fdc87fbe82ee098ebe1199013 /qga
parent1167bfd63d983eaa4816ee0edb185f98ff070d6d (diff)
downloadqemu-4eb36d40da8062400a2e7e27f1038e1252df9ede.zip
qemu-4eb36d40da8062400a2e7e27f1038e1252df9ede.tar.gz
qemu-4eb36d40da8062400a2e7e27f1038e1252df9ede.tar.bz2
guest-agent: only enable FSFREEZE when it's supported by the kernel
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qga')
-rw-r--r--qga/guest-agent-commands.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/qga/guest-agent-commands.c b/qga/guest-agent-commands.c
index 624972e..30c4068 100644
--- a/qga/guest-agent-commands.c
+++ b/qga/guest-agent-commands.c
@@ -10,15 +10,17 @@
* See the COPYING file in the top-level directory.
*/
-#if defined(__linux__)
-#define CONFIG_FSFREEZE
-#endif
-
#include <glib.h>
-#if defined(CONFIG_FSFREEZE)
+
+#if defined(__linux__)
#include <mntent.h>
#include <linux/fs.h>
+
+#if defined(__linux__) && defined(FIFREEZE)
+#define CONFIG_FSFREEZE
#endif
+#endif
+
#include <sys/types.h>
#include <sys/ioctl.h>
#include "qga/guest-agent-core.h"