aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenstore/utils.c
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-08-01 19:17:08 +0100
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-08-01 19:17:08 +0100
commit79a18447fe70c67d682bcf585c2234efca25f46a (patch)
tree5910043d684fc863381f3c77a89f262630c5dcbb /tools/xenstore/utils.c
parent71b66d78933833d09538c903ded167636acf8a59 (diff)
downloadxen-79a18447fe70c67d682bcf585c2234efca25f46a.tar.gz
xen-79a18447fe70c67d682bcf585c2234efca25f46a.tar.bz2
xen-79a18447fe70c67d682bcf585c2234efca25f46a.zip
xenstore: Do not assign to stdout/stderr/stdin - they are not
implemented as variables on all systems. Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'tools/xenstore/utils.c')
-rw-r--r--tools/xenstore/utils.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/xenstore/utils.c b/tools/xenstore/utils.c
index d7f5219a87..a1ac12584a 100644
--- a/tools/xenstore/utils.c
+++ b/tools/xenstore/utils.c
@@ -10,19 +10,18 @@
#include <signal.h>
#include "utils.h"
-void xprintf(const char *fmt, ...)
+static void default_xprintf(const char *fmt, ...)
{
va_list args;
- if (!stderr)
- return; /* could trace()? */
-
va_start(args, fmt);
vfprintf(stderr, fmt, args);
va_end(args);
fflush(stderr);
}
+void (*xprintf)(const char *fmt, ...) = default_xprintf;
+
void barf(const char *fmt, ...)
{
char *str;