>From 4d80e57b9f4e3b1292a00c6753363a5d6cec60f1 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Wed, 25 Nov 2009 16:35:22 +0000 Subject: [PATCH 3/3] LOCAL: DISABLE PRINTF FORMATTERS --- daemon/guestfsd.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index 3af0baa..9f9d5df 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -66,6 +66,7 @@ static char *read_cmdline (void); int verbose = 0; +#ifndef WIN32 static int print_shell_quote (FILE *stream, const struct printf_info *info, const void *const *args); static int print_sysroot_shell_quote (FILE *stream, const struct printf_info *info, const void *const *args); #ifdef HAVE_REGISTER_PRINTF_SPECIFIER @@ -77,6 +78,7 @@ static int print_arginfo (const struct printf_info *info, size_t n, int *argtype #error "HAVE_REGISTER_PRINTF_{SPECIFIER|FUNCTION} not defined" #endif #endif +#endif /* Location to mount root device. */ const char *sysroot = "/sysroot"; /* No trailing slash. */ @@ -105,6 +107,7 @@ main (int argc, char *argv[]) char *cmdline; char *vmchannel = NULL; +#ifndef WIN32 #ifdef HAVE_REGISTER_PRINTF_SPECIFIER /* http://udrepper.livejournal.com/20948.html */ register_printf_specifier ('Q', print_shell_quote, print_arginfo); @@ -117,6 +120,7 @@ main (int argc, char *argv[]) #error "HAVE_REGISTER_PRINTF_{SPECIFIER|FUNCTION} not defined" #endif #endif +#endif for (;;) { c = getopt_long (argc, argv, options, long_options, NULL); @@ -899,6 +903,7 @@ split_lines (char *str) return lines; } +#ifndef WIN32 /* printf helper function so we can use %Q ("quoted") and %R to print * shell-quoted strings. See HACKING file for more details. */ @@ -957,6 +962,7 @@ print_arginfo (const struct printf_info *info, size_t n, int *argtypes) #error "HAVE_REGISTER_PRINTF_{SPECIFIER|FUNCTION} not defined" #endif #endif +#endif /* Perform device name translation. Don't call this directly - * use the RESOLVE_DEVICE macro. -- 1.6.5.2