From 97ebfc7314b162fd8d464c764b3299c5230d2afc Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Mon, 23 Aug 2010 12:54:27 +0100 Subject: [PATCH] Make print_timestamped_message into a cross-module function. This is just code movement. (cherry picked from commit 4b753c62089be663ac722e4a875bb061d259e87d) --- src/guestfs-internal.h | 1 + src/launch.c | 17 ++++++++--------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h index 9d76edb..a593458 100644 --- a/src/guestfs-internal.h +++ b/src/guestfs-internal.h @@ -144,6 +144,7 @@ extern void *guestfs_safe_realloc (guestfs_h *g, void *ptr, int nbytes); extern char *guestfs_safe_strdup (guestfs_h *g, const char *str); extern char *guestfs_safe_strndup (guestfs_h *g, const char *str, size_t n); extern void *guestfs_safe_memdup (guestfs_h *g, void *ptr, size_t size); +extern void guestfs___print_timestamped_message (guestfs_h *g, const char *fs, ...); extern const char *guestfs___tmpdir (void); extern int guestfs___set_busy (guestfs_h *g); extern int guestfs___end_busy (guestfs_h *g); diff --git a/src/launch.c b/src/launch.c index 4a479bc..07a89ec 100644 --- a/src/launch.c +++ b/src/launch.c @@ -255,7 +255,6 @@ dir_contains_files (const char *dir, ...) return 1; } -static void print_timestamped_message (guestfs_h *g, const char *fs, ...); static int build_supermin_appliance (guestfs_h *g, const char *path, char **kernel, char **initrd); static int is_openable (guestfs_h *g, const char *path, int flags); static void print_cmdline (guestfs_h *g); @@ -400,7 +399,7 @@ guestfs__launch (guestfs_h *g) } if (g->verbose) - print_timestamped_message (g, "begin testing qemu features"); + guestfs___print_timestamped_message (g, "begin testing qemu features"); /* Get qemu help text and version. */ if (qemu_supports (g, NULL) == -1) @@ -463,7 +462,7 @@ guestfs__launch (guestfs_h *g) } if (g->verbose) - print_timestamped_message (g, "finished testing qemu features"); + guestfs___print_timestamped_message (g, "finished testing qemu features"); r = fork (); if (r == -1) { @@ -830,7 +829,7 @@ guestfs__launch (guestfs_h *g) } if (g->verbose) - print_timestamped_message (g, "appliance is up"); + guestfs___print_timestamped_message (g, "appliance is up"); /* This is possible in some really strange situations, such as * guestfsd starts up OK but then qemu immediately exits. Check for @@ -928,7 +927,7 @@ build_supermin_appliance (guestfs_h *g, const char *path, int r, len; if (g->verbose) - print_timestamped_message (g, "begin building supermin appliance"); + guestfs___print_timestamped_message (g, "begin building supermin appliance"); len = strlen (g->tmpdir); *kernel = safe_malloc (g, len + 8); @@ -951,7 +950,7 @@ build_supermin_appliance (guestfs_h *g, const char *path, path, *kernel, *initrd); if (g->verbose) - print_timestamped_message (g, "%s", cmd); + guestfs___print_timestamped_message (g, "%s", cmd); r = system (cmd); if (r == -1 || WEXITSTATUS(r) != 0) { @@ -963,7 +962,7 @@ build_supermin_appliance (guestfs_h *g, const char *path, } if (g->verbose) - print_timestamped_message (g, "finished building supermin appliance"); + guestfs___print_timestamped_message (g, "finished building supermin appliance"); return 0; } @@ -982,8 +981,8 @@ timeval_diff (const struct timeval *x, const struct timeval *y) return msec; } -static void -print_timestamped_message (guestfs_h *g, const char *fs, ...) +void +guestfs___print_timestamped_message (guestfs_h *g, const char *fs, ...) { va_list args; char *msg; -- 1.8.3.1