From patchwork Wed Apr 3 08:52:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 2385511 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 86CE73FD8C for ; Wed, 3 Apr 2013 08:51:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762737Ab3DCIvc (ORCPT ); Wed, 3 Apr 2013 04:51:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24851 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755047Ab3DCIva (ORCPT ); Wed, 3 Apr 2013 04:51:30 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r338pTIi031846 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 3 Apr 2013 04:51:29 -0400 Received: from redhat.com (vpn1-6-164.ams2.redhat.com [10.36.6.164]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id r338pRfQ009905; Wed, 3 Apr 2013 04:51:28 -0400 Date: Wed, 3 Apr 2013 11:52:23 +0300 From: "Michael S. Tsirkin" To: kvm@vger.kernel.org, pbonzini@redhat.com, gleb@redhat.com, mtosatti@redhat.com Subject: [PATCH 1/5] kvm-unittest: add printf %c support Message-ID: <13998408e76cdad5f01d63b5b401c93164d2dc18.1364979131.git.mst@redhat.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mutt-Fcc: =sent X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Handy for printing debug strings from hardware. Signed-off-by: Michael S. Tsirkin --- 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;