From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38367) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VY6Dm-00070L-65 for qemu-devel@nongnu.org; Sun, 20 Oct 2013 23:32:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VY6Dd-0005GG-7m for qemu-devel@nongnu.org; Sun, 20 Oct 2013 23:31:58 -0400 Received: from e23smtp01.au.ibm.com ([202.81.31.143]:40560) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VY6Db-0005Fy-VB for qemu-devel@nongnu.org; Sun, 20 Oct 2013 23:31:49 -0400 Received: from /spool/local by e23smtp01.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 21 Oct 2013 13:31:45 +1000 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [9.190.235.21]) by d23dlp03.au.ibm.com (Postfix) with ESMTP id B519F3578056 for ; Mon, 21 Oct 2013 14:31:43 +1100 (EST) Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r9L3VRvx54067382 for ; Mon, 21 Oct 2013 14:31:32 +1100 Received: from d23av04.au.ibm.com (localhost [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r9L3VcGN015369 for ; Mon, 21 Oct 2013 14:31:38 +1100 Message-ID: <5264A019.6010009@linux.vnet.ibm.com> Date: Mon, 21 Oct 2013 11:31:37 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <1382058681-14957-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1382058681-14957-9-git-send-email-xiawenc@linux.vnet.ibm.com> <526102B4.9010108@redhat.com> <87eh7iu7s6.fsf@blackfin.pond.sub.org> In-Reply-To: <87eh7iu7s6.fsf@blackfin.pond.sub.org> Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 08/13] error: don't set sep when print progname List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , Paolo Bonzini Cc: kwolf@redhat.com, stefanha@gmail.com, qemu-devel@nongnu.org, lcapitulino@redhat.com ÓÚ 2013/10/18 19:40, Markus Armbruster дµÀ: > Paolo Bonzini writes: > >> Il 18/10/2013 03:11, Wenchao Xia ha scritto: >>> The behavior to set sep brings trouble to modification later, >>> the logic is not changed by add tailing space in fprintf(). >>> >>> Signed-off-by: Wenchao Xia >>> --- >>> util/qemu-error.c | 5 ++--- >>> 1 files changed, 2 insertions(+), 3 deletions(-) >>> >>> diff --git a/util/qemu-error.c b/util/qemu-error.c >>> index 0ccd3e9..d1e858a 100644 >>> --- a/util/qemu-error.c >>> +++ b/util/qemu-error.c >>> @@ -161,8 +161,7 @@ static void error_print_loc(void) >>> const char *const *argp; >>> >>> if (!cur_mon && progname) { >>> - fprintf(stderr, "%s:", progname); >>> - sep = " "; >>> + fprintf(stderr, "%s: ", progname); >>> } >>> switch (cur_loc->kind) { >>> case LOC_CMDLINE: >>> @@ -181,7 +180,7 @@ static void error_print_loc(void) >>> error_printf(" "); >>> break; >>> default: >>> - error_printf("%s", sep); >>> + break; >>> } >>> } >>> >>> >> This changes behavior for LOC_FILE. >> >> Before: >> >> $ cat xyz.cfg >> [device "abc"] >> driver = def >> $ qemu-system-x86_64 -readconfig xyz.cfg >> qemu-system-x86_64:xyz.cfg:2: parse error >> >> After: >> >> $ qemu-system-x86_64 -readconfig xyz.cfg >> qemu-system-x86_64: xyz.cfg:2: parse error >> >> Could even be an improvement, but you need to note it in the commit message. > No, it is not an improvement. The old format matches exactly how other > report errors with location, e.g. jade. Please leave it that way, > I'll check whether there is way to leave the logic as it was.