diff options
author | Ewan Mellor <ewan@xensource.com> | 2007-03-26 00:12:19 +0100 |
---|---|---|
committer | Ewan Mellor <ewan@xensource.com> | 2007-03-26 00:12:19 +0100 |
commit | 53829083671ff9c3cc63ff47a8f35ff957693e79 (patch) | |
tree | b558846f2de06edb19879e70bd51216758afaebe /tools/libxen | |
parent | d4eac439d5e67640f63dc5c03d51e23201c73ed3 (diff) | |
download | xen-53829083671ff9c3cc63ff47a8f35ff957693e79.tar.gz xen-53829083671ff9c3cc63ff47a8f35ff957693e79.tar.bz2 xen-53829083671ff9c3cc63ff47a8f35ff957693e79.zip |
Tidy up use of stdout vs stderr.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
Diffstat (limited to 'tools/libxen')
-rw-r--r-- | tools/libxen/test/test_bindings.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/tools/libxen/test/test_bindings.c b/tools/libxen/test/test_bindings.c index bc4d875160..58074a9b02 100644 --- a/tools/libxen/test/test_bindings.c +++ b/tools/libxen/test/test_bindings.c @@ -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]); + printf("%x, ", (unsigned int)vm_uuid_bytes[i]); } - fprintf(stderr, "%x.\n", (unsigned int)vm_uuid_bytes[15]); + 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 *session, bool hvm) } 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_session *session, xen_vm vm) 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_session *session) 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 *session, xen_vm vm) xen_vm_metrics_record_free(vm_metrics_record); xen_vm_metrics_free(vm_metrics); + + fflush(stdout); } |