From patchwork Thu Apr 19 12:09:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 153730 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C5949B6FF5 for ; Thu, 19 Apr 2012 22:10:21 +1000 (EST) Received: from localhost ([::1]:57766 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SKqBn-0001Dy-1N for incoming@patchwork.ozlabs.org; Thu, 19 Apr 2012 08:10:19 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52249) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SKqBc-0001BF-1o for qemu-devel@nongnu.org; Thu, 19 Apr 2012 08:10:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SKqBW-00069O-3F for qemu-devel@nongnu.org; Thu, 19 Apr 2012 08:10:07 -0400 Received: from mail-iy0-f173.google.com ([209.85.210.173]:58313) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SKqBV-00064r-Ru for qemu-devel@nongnu.org; Thu, 19 Apr 2012 08:10:02 -0400 Received: by iafj26 with SMTP id j26so13797978iaf.4 for ; Thu, 19 Apr 2012 05:09:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer; bh=aD0mHQpzXzZp7P7pqmR38jy7m/qh2Znd1Vr3EEeWXJQ=; b=SAY86QiVaEIdFyQWNM0922Wvps5YUFURuxXzyzwamJ5Idb441DxHRDIhpRR7rRjmlf RxSFlsNv9REqhpoApFgtlecu6gdjTb27LAeWtc2LGlUeJFx2E1X1lH37vOm+nky16APs oP4GGl8HJZs2Xl6SCdwH6kCemsns5H6RPs+Pb7Ee/Z4woheyu01GZ3mMnqwCBSSY88dd YnHimtZ6LHf5wLwo5Db8qe7n/P5hxb65q8VtWYC84OIdJT2Re4M3xTImG31/ugcwpM9N DfbIgKof/4OPWwGtDtfgCIk/eGx21GP8joge5BO/OLOmylkkwpOPC+k7cXe1qYxGME7S TUag== Received: by 10.43.56.196 with SMTP id wd4mr1444792icb.40.1334837399045; Thu, 19 Apr 2012 05:09:59 -0700 (PDT) Received: from pebble.com ([12.236.175.36]) by mx.google.com with ESMTPS id i7sm24295391igq.11.2012.04.19.05.09.56 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 19 Apr 2012 05:09:57 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 19 Apr 2012 07:09:33 -0500 Message-Id: <1334837373-30470-1-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.7.7.6 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.210.173 Cc: Paolo Bonzini , Anthony Liguori Subject: [Qemu-devel] [PATCH] qtest: Fix tv_usec != long X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sparc Debian 5.0.8 does not define __suseconds_t as long, but FMT_timeval expects %ld. Signed-off-by: Richard Henderson Cc: Anthony Liguori Cc: Paolo Bonzini Reviewed-by: Paolo Bonzini --- qtest.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qtest.c b/qtest.c index 18afcd9..fbfab4e 100644 --- a/qtest.c +++ b/qtest.c @@ -153,7 +153,7 @@ static void qtest_send_prefix(CharDriverState *chr) qtest_get_time(&tv); fprintf(qtest_log_fp, "[S +" FMT_timeval "] ", - tv.tv_sec, tv.tv_usec); + tv.tv_sec, (long) tv.tv_usec); } static void GCC_FMT_ATTR(2, 3) qtest_send(CharDriverState *chr, @@ -201,7 +201,7 @@ static void qtest_process_command(CharDriverState *chr, gchar **words) qtest_get_time(&tv); fprintf(qtest_log_fp, "[R +" FMT_timeval "]", - tv.tv_sec, tv.tv_usec); + tv.tv_sec, (long) tv.tv_usec); for (i = 0; words[i]; i++) { fprintf(qtest_log_fp, " %s", words[i]); } @@ -399,7 +399,7 @@ static void qtest_event(void *opaque, int event) qtest_opened = true; if (qtest_log_fp) { fprintf(qtest_log_fp, "[I " FMT_timeval "] OPENED\n", - start_time.tv_sec, start_time.tv_usec); + start_time.tv_sec, (long) start_time.tv_usec); } break; case CHR_EVENT_CLOSED: @@ -408,7 +408,7 @@ static void qtest_event(void *opaque, int event) qemu_timeval tv; qtest_get_time(&tv); fprintf(qtest_log_fp, "[I +" FMT_timeval "] CLOSED\n", - tv.tv_sec, tv.tv_usec); + tv.tv_sec, (long) tv.tv_usec); } break; default: