# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1174864339 -3600
# Node ID 57becbbe1564b4d464e032820caf78bb3c52648a
# Parent eb52a7f22e72e6cd6a61c273f82a63110c8c461d
Tidy up use of stdout vs stderr.
Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
tools/libxen/test/test_bindings.c | 30 +++++++++++++++++-------------
1 files changed, 17 insertions(+), 13 deletions(-)
diff -r eb52a7f22e72 -r 57becbbe1564 tools/libxen/test/test_bindings.c
--- a/tools/libxen/test/test_bindings.c Mon Mar 26 00:09:00 2007 +0100
+++ b/tools/libxen/test/test_bindings.c Mon Mar 26 00:12:19 2007 +0100
@@ -266,12 +266,12 @@ int main(int argc, char **argv)
printf("%s.\n", vm_uuid);
- fprintf(stderr, "In bytes, the VM UUID is ");
+ printf("In bytes, the VM UUID is ");
for (int i = 0; i < 15; i++)
{
- fprintf(stderr, "%x, ", (unsigned int)vm_uuid_bytes[i]);
- }
- fprintf(stderr, "%x.\n", (unsigned int)vm_uuid_bytes[15]);
+ printf("%x, ", (unsigned int)vm_uuid_bytes[i]);
+ }
+ printf("%x.\n", (unsigned int)vm_uuid_bytes[15]);
printf("%zd.\n", versions->size);
@@ -529,16 +529,14 @@ static xen_vm create_new_vm(xen_session
}
if (hvm) {
- fprintf(stderr,
- "Created a new HVM VM, with UUID %s, VDI UUID %s, VBD "
- "UUID %s, and VNC console UUID %s.\n",
- vm_uuid, vdi0_uuid, vbd0_uuid, vnc_uuid);
+ printf("Created a new HVM VM, with UUID %s, VDI UUID %s, VBD "
+ "UUID %s, and VNC console UUID %s.\n",
+ vm_uuid, vdi0_uuid, vbd0_uuid, vnc_uuid);
}
else {
- fprintf(stderr,
- "Created a new PV VM, with UUID %s, VDI UUID %s, and VBD "
- "UUID %s.\n",
- vm_uuid, vdi0_uuid, vbd0_uuid);
+ printf("Created a new PV VM, with UUID %s, VDI UUID %s, and VBD "
+ "UUID %s.\n",
+ vm_uuid, vdi0_uuid, vbd0_uuid);
}
xen_uuid_free(vm_uuid);
@@ -579,6 +577,8 @@ static void print_vm_power_state(xen_ses
xen_vm_power_state_to_string(power_state));
xen_uuid_free(vm_uuid);
+
+ fflush(stdout);
}
@@ -627,6 +627,8 @@ static void print_session_info(xen_sessi
assert(!strcmp(record->this_user, this_user));
xen_session_record_free(record);
+
+ fflush(stdout);
}
@@ -664,4 +666,6 @@ static void print_vm_metrics(xen_session
xen_vm_metrics_record_free(vm_metrics_record);
xen_vm_metrics_free(vm_metrics);
-}
+
+ fflush(stdout);
+}
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|