From e1caa984ad66a1ee324aedb6c242908870137988 Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: <707b9b97153063374d2530e72c49b1499fc21af9.1367947969.git.minovotn@redhat.com> References: <707b9b97153063374d2530e72c49b1499fc21af9.1367947969.git.minovotn@redhat.com> From: Michal Novotny Date: Tue, 7 May 2013 18:38:41 +0200 Subject: [PATCH 057/114] Revert "qemu-ga: make names more generic for mount list functions" This reverts commit 9b59b2f53b59cfafca130a392a76334e55b8e1bd. Reverting as asked by Laszlo in message <51892739.2030807@redhat.com> because of the ordering issue (most likely) related to supersed testing. Signed-off-by: Michal Novotny --- qga/commands-posix.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/qga/commands-posix.c b/qga/commands-posix.c index 05f477d..490856e 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -315,17 +315,17 @@ static void guest_file_init(void) #if defined(CONFIG_FSFREEZE) -typedef struct FsMount { +typedef struct GuestFsfreezeMount { char *dirname; char *devtype; - QTAILQ_ENTRY(FsMount) next; -} FsMount; + QTAILQ_ENTRY(GuestFsfreezeMount) next; +} GuestFsfreezeMount; -typedef QTAILQ_HEAD(, FsMount) FsMountList; +typedef QTAILQ_HEAD(, GuestFsfreezeMount) GuestFsfreezeMountList; -static void free_fs_mount_list(FsMountList *mounts) +static void guest_fsfreeze_free_mount_list(GuestFsfreezeMountList *mounts) { - FsMount *mount, *temp; + GuestFsfreezeMount *mount, *temp; if (!mounts) { return; @@ -342,10 +342,10 @@ static void free_fs_mount_list(FsMountList *mounts) /* * Walk the mount table and build a list of local file systems */ -static int build_fs_mount_list(FsMountList *mounts) +static int guest_fsfreeze_build_mount_list(GuestFsfreezeMountList *mounts) { struct mntent *ment; - FsMount *mount; + GuestFsfreezeMount *mount; char const *mtab = "/proc/self/mounts"; FILE *fp; @@ -368,7 +368,7 @@ static int build_fs_mount_list(FsMountList *mounts) continue; } - mount = g_malloc0(sizeof(FsMount)); + mount = g_malloc0(sizeof(GuestFsfreezeMount)); mount->dirname = g_strdup(ment->mnt_dir); mount->devtype = g_strdup(ment->mnt_type); @@ -399,15 +399,15 @@ GuestFsfreezeStatus qmp_guest_fsfreeze_status(Error **err) int64_t qmp_guest_fsfreeze_freeze(Error **err) { int ret = 0, i = 0; - FsMountList mounts; - struct FsMount *mount; + GuestFsfreezeMountList mounts; + struct GuestFsfreezeMount *mount; int fd; char err_msg[512]; slog("guest-fsfreeze called"); QTAILQ_INIT(&mounts); - ret = build_fs_mount_list(&mounts); + ret = guest_fsfreeze_build_mount_list(&mounts); if (ret < 0) { return ret; } @@ -448,11 +448,11 @@ int64_t qmp_guest_fsfreeze_freeze(Error **err) close(fd); } - free_fs_mount_list(&mounts); + guest_fsfreeze_free_mount_list(&mounts); return i; error: - free_fs_mount_list(&mounts); + guest_fsfreeze_free_mount_list(&mounts); qmp_guest_fsfreeze_thaw(NULL); return 0; } @@ -463,12 +463,12 @@ error: int64_t qmp_guest_fsfreeze_thaw(Error **err) { int ret; - FsMountList mounts; - FsMount *mount; + GuestFsfreezeMountList mounts; + GuestFsfreezeMount *mount; int fd, i = 0, logged; QTAILQ_INIT(&mounts); - ret = build_fs_mount_list(&mounts); + ret = guest_fsfreeze_build_mount_list(&mounts); if (ret) { error_set(err, QERR_QGA_COMMAND_FAILED, "failed to enumerate filesystems"); @@ -508,7 +508,7 @@ int64_t qmp_guest_fsfreeze_thaw(Error **err) } ga_unset_frozen(ga_state); - free_fs_mount_list(&mounts); + guest_fsfreeze_free_mount_list(&mounts); return i; } -- 1.7.11.7