From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LQ3E8-0002yg-2o for qemu-devel@nongnu.org; Thu, 22 Jan 2009 12:20:24 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LQ3E4-0002wZ-Pg for qemu-devel@nongnu.org; Thu, 22 Jan 2009 12:20:23 -0500 Received: from [199.232.76.173] (port=40341 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LQ3E4-0002wO-JF for qemu-devel@nongnu.org; Thu, 22 Jan 2009 12:20:20 -0500 Received: from e5.ny.us.ibm.com ([32.97.182.145]:44463) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LQ3E4-0006Xm-7z for qemu-devel@nongnu.org; Thu, 22 Jan 2009 12:20:20 -0500 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e5.ny.us.ibm.com (8.13.1/8.13.1) with ESMTP id n0MHIQPr029615 for ; Thu, 22 Jan 2009 12:18:26 -0500 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id n0MHKJ0J188328 for ; Thu, 22 Jan 2009 12:20:19 -0500 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n0MHKJ7A024985 for ; Thu, 22 Jan 2009 12:20:19 -0500 Received: from squirrel.codemonkey.ws (sig-9-65-90-232.mts.ibm.com [9.65.90.232]) by d01av04.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id n0MHKIU8024912 for ; Thu, 22 Jan 2009 12:20:18 -0500 Message-ID: <4978AAC7.9000205@us.ibm.com> Date: Thu, 22 Jan 2009 11:20:07 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] monitor-mux: fix timestamp prefixes References: <4975CA03.3070700@siemens.com> In-Reply-To: <4975CA03.3070700@siemens.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Jan Kiszka wrote: > rt_clock returns milliseconds. Fix mux'ed monitor terminal timestamps > accordingly. > > Signed-off-by: Jan Kiszka > Applied. Thanks. Regards, Anthony Liguori > --- > > qemu-char.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/qemu-char.c b/qemu-char.c > index ac431c7..f849187 100644 > --- a/qemu-char.c > +++ b/qemu-char.c > @@ -241,13 +241,13 @@ static int mux_chr_write(CharDriverState *chr, const uint8_t *buf, int len) > if (term_timestamps_start == -1) > term_timestamps_start = ti; > ti -= term_timestamps_start; > - secs = ti / 1000000000; > + secs = ti / 1000; > snprintf(buf1, sizeof(buf1), > "[%02d:%02d:%02d.%03d] ", > secs / 3600, > (secs / 60) % 60, > secs % 60, > - (int)((ti / 1000000) % 1000)); > + (int)(ti % 1000)); > d->drv->chr_write(d->drv, (uint8_t *)buf1, strlen(buf1)); > } > } > > > >