diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2012-05-30 15:02:03 +0800 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-05-30 15:02:03 +0800 |
commit | d6111501c15972e48b20a60ab0fdd726e84a3ed1 (patch) | |
tree | 9a62891981a2f89dd2a73bf58134bf6aad7471d2 | |
parent | eba25057b9a5e19d10ace2bc7716667a31297169 (diff) | |
parent | 9e2fa418fbe71dd472fe5a9cd89ca26d5b594920 (diff) | |
download | qemu-d6111501c15972e48b20a60ab0fdd726e84a3ed1.tar.gz qemu-d6111501c15972e48b20a60ab0fdd726e84a3ed1.tar.bz2 qemu-d6111501c15972e48b20a60ab0fdd726e84a3ed1.zip |
Merge remote-tracking branch 'mdroth/qga-pull-5-29-12-v2' into staging
* mdroth/qga-pull-5-29-12-v2:
qemu-ga: avoid blocking on atime update when reading /etc/mtab
qemu-ga: Fix use of environ on Darwin
-rw-r--r-- | qga/commands-posix.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/qga/commands-posix.c b/qga/commands-posix.c index dab3bf9c98..00d035da95 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -22,8 +22,13 @@ #include "host-utils.h" #ifndef CONFIG_HAS_ENVIRON +#ifdef __APPLE__ +#include <crt_externs.h> +#define environ (*_NSGetEnviron()) +#else extern char **environ; #endif +#endif #if defined(__linux__) #include <mntent.h> @@ -340,7 +345,7 @@ static int guest_fsfreeze_build_mount_list(GuestFsfreezeMountList *mounts) { struct mntent *ment; GuestFsfreezeMount *mount; - char const *mtab = MOUNTED; + char const *mtab = "/proc/self/mounts"; FILE *fp; fp = setmntent(mtab, "r"); |