summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2008-04-30 11:19:27 +0200
committerAvi Kivity <avi@qumranet.com>2008-04-30 23:01:23 +0300
commit99aabefb6fc13ea6e7e7441b2b4ee2aedf702304 (patch)
treea436f55079a805341ed5dc82d5cf4866644a5be1
parent7bf5272dde4152b11e501e31d40ed69fa3f8254f (diff)
kvm: libkvm: dump all errors to stderr
Minor cleanup I came across while reverting printf instrumentations. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
-rw-r--r--libkvm/libkvm-x86.c4
-rw-r--r--libkvm/libkvm.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/libkvm/libkvm-x86.c b/libkvm/libkvm-x86.c
index 6dba91df..28efeee3 100644
--- a/libkvm/libkvm-x86.c
+++ b/libkvm/libkvm-x86.c
@@ -117,7 +117,7 @@ static int kvm_init_tss(kvm_context_t kvm)
*/
r = kvm_set_tss_addr(kvm, 0xfffbd000);
if (r < 0) {
- printf("kvm_init_tss: unable to set tss addr\n");
+ fprintf(stderr, "kvm_init_tss: unable to set tss addr\n");
return r;
}
@@ -157,7 +157,7 @@ int kvm_create_pit(kvm_context_t kvm)
if (r >= 0)
kvm->pit_in_kernel = 1;
else {
- printf("Create kernel PIC irqchip failed\n");
+ fprintf(stderr, "Create kernel PIC irqchip failed\n");
return r;
}
}
diff --git a/libkvm/libkvm.c b/libkvm/libkvm.c
index 2992536b..f4852b67 100644
--- a/libkvm/libkvm.c
+++ b/libkvm/libkvm.c
@@ -368,7 +368,7 @@ void kvm_create_irqchip(kvm_context_t kvm)
if (r >= 0)
kvm->irqchip_in_kernel = 1;
else
- printf("Create kernel PIC irqchip failed\n");
+ fprintf(stderr, "Create kernel PIC irqchip failed\n");
}
}
#endif
@@ -877,7 +877,7 @@ again:
if (r == -1 && errno != EINTR && errno != EAGAIN) {
r = -errno;
post_kvm_run(kvm, vcpu);
- printf("kvm_run: %s\n", strerror(-r));
+ fprintf(stderr, "kvm_run: %s\n", strerror(-r));
return r;
}