aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenstore/utils.c
diff options
context:
space:
mode:
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>2005-07-12 10:16:33 +0000
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>2005-07-12 10:16:33 +0000
commit0f36f0e0957a552d7d577c849182b783543998f2 (patch)
tree04d58fc9f98685a0a4ee402c154ec4da505bedee /tools/xenstore/utils.c
parent247bc37e8389c6b32e80c8bba67b70f2e851950b (diff)
downloadxen-0f36f0e0957a552d7d577c849182b783543998f2.tar.gz
xen-0f36f0e0957a552d7d577c849182b783543998f2.tar.bz2
xen-0f36f0e0957a552d7d577c849182b783543998f2.zip
xenstored updates.
- add trace file support. - update permissions code. - trigger watches on children of nodes being removed. - update test cases. Signed-off-by: Rusty Russel <rusty@rustcorp.com.au> Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Diffstat (limited to 'tools/xenstore/utils.c')
-rw-r--r--tools/xenstore/utils.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/tools/xenstore/utils.c b/tools/xenstore/utils.c
index 2345021f70..0b1ac8aedd 100644
--- a/tools/xenstore/utils.c
+++ b/tools/xenstore/utils.c
@@ -13,17 +13,15 @@
void xprintf(const char *fmt, ...)
{
- static FILE *out = NULL;
- va_list args;
- if (!out)
- out = fopen("/dev/console", "w");
+ static FILE *out = NULL;
+ va_list args;
if (!out)
out = stderr;
- va_start(args, fmt);
- vfprintf(out, fmt, args);
- va_end(args);
- fflush(out);
+ va_start(args, fmt);
+ vfprintf(out, fmt, args);
+ va_end(args);
+ fflush(out);
}
void barf(const char *fmt, ...)
@@ -61,14 +59,14 @@ void barf_perror(const char *fmt, ...)
void *_realloc_array(void *ptr, size_t size, size_t num)
{
- if (num >= SIZE_MAX/size)
- return NULL;
- return realloc_nofail(ptr, size * num);
+ if (num >= SIZE_MAX/size)
+ return NULL;
+ return realloc_nofail(ptr, size * num);
}
void *realloc_nofail(void *ptr, size_t size)
{
- ptr = realloc(ptr, size);
+ ptr = realloc(ptr, size);
if (ptr)
return ptr;
barf("realloc of %zu failed", size);