Skip to contentSkip to conversation

vl: trivial: use error_report for max-cpu error

PATCH In review Andrew Jones 3 participants 3 messages Oct 26, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vl: trivial: use error_report for max-cpu error

---

There are plenty of fprintf's left in vl.c, but here's another baby step...

 vl.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
vl.c +3 -3
index 9a64b75ebbd24..549c6675fe8df 100644
@@ -4080,9 +4080,9 @@ int main(int argc, char **argv, char **envp)
 
     machine_class->max_cpus = machine_class->max_cpus ?: 1; /* Default to UP */
     if (max_cpus > machine_class->max_cpus) {
-        fprintf(stderr, "Number of SMP CPUs requested (%d) exceeds max CPUs "
-                "supported by machine '%s' (%d)\n", max_cpus,
-                machine_class->name, machine_class->max_cpus);
+        error_report("Number of SMP CPUs requested (%d) exceeds max CPUs "
+                     "supported by machine '%s' (%d)", max_cpus,
+                     machine_class->name, machine_class->max_cpus);
         exit(1);
     }
 
Signature · 1 line
2.4.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Andrew Jones

---

There are plenty of fprintf's left in vl.c, but here's another baby step...

 vl.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Signature · 2 lines
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org
#2 lore raw
Quoted 11 lines · Eric Blake
Quoted 8 lines · Andrew Jones

---

There are plenty of fprintf's left in vl.c, but here's another baby step...

 vl.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

I just sent a patch changing all fprintf(stderr) calls in vl.c. If this patch is appropriate post-soft-freeze (I am not sure it is), we could simply change all fprintf() calls in vl.c in a single step.

Signature · 1 line
Eduardo