[PATCH 1/5] kvm-unittest: add printf %c support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Handy for printing debug strings from hardware.

Signed-off-by: Michael S. Tsirkin <mst@xxxxxxxxxx>
---
 lib/printf.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/printf.c b/lib/printf.c
index 3bb9e3d..867eb19 100644
--- a/lib/printf.c
+++ b/lib/printf.c
@@ -104,6 +104,9 @@ int vsnprintf(char *buf, int size, const char *fmt, va_list va)
 	case '%':
 	    addchar(&s, '%');
 	    break;
+	case 'c':
+            addchar(&s, va_arg(va, int));
+	    break;
 	case '\0':
 	    --fmt;
 	    break;
-- 
MST

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux