From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49246) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWe4e-0005Mq-Aq for qemu-devel@nongnu.org; Wed, 16 Oct 2013 23:16:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VWe4T-00054S-Eg for qemu-devel@nongnu.org; Wed, 16 Oct 2013 23:16:32 -0400 Received: from e23smtp06.au.ibm.com ([202.81.31.148]:44584) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWe4R-00052R-F2 for qemu-devel@nongnu.org; Wed, 16 Oct 2013 23:16:21 -0400 Received: from /spool/local by e23smtp06.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 17 Oct 2013 13:16:12 +1000 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [9.190.235.21]) by d23dlp02.au.ibm.com (Postfix) with ESMTP id 8C6CF2BB0052 for ; Thu, 17 Oct 2013 14:16:10 +1100 (EST) Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r9H3FqbY10158376 for ; Thu, 17 Oct 2013 14:15:58 +1100 Received: from d23av02.au.ibm.com (localhost [127.0.0.1]) by d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r9H3G3GI013841 for ; Thu, 17 Oct 2013 14:16:04 +1100 From: Mike Qiu Date: Wed, 16 Oct 2013 23:16:01 -0400 Message-Id: <1381979761-2180-1-git-send-email-qiudayu@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH v2] hmp: solve '\n' in monitor_printf() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, benoit@irqsave.net, armbru@redhat.com, lcapitulino@redhat.com, Mike Qiu , stefanha@redhat.com, xiawenc@linux.vnet.ibm.com Change to v1: remove '[not inserted]' line instead of adding '\n' Output of 'info block' scsi0-hd0: /images/f18-ppc64.qcow2 (qcow2) [not inserted] scsi0-cd2: [not inserted] Removable device: not locked, tray closed floppy0: [not inserted] Removable device: not locked, tray closed sd0: [not inserted] Removable device: not locked, tray closed There will be no additional lines between scsi0-hd0 and scsi0-cd2. At the same time, scsi0-hd0 already inserted, but still has '[not inserted]' flag. This line should be removed. This patch is to solve this. Signed-off-by: Mike Qiu --- hmp.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hmp.c b/hmp.c index 5891507..32ee285 100644 --- a/hmp.c +++ b/hmp.c @@ -366,8 +366,6 @@ void hmp_info_block(Monitor *mon, const QDict *qdict) info->value->inserted->iops_rd_max, info->value->inserted->iops_wr_max, info->value->inserted->iops_size); - } else { - monitor_printf(mon, " [not inserted]"); } if (verbose) { -- 1.8.3.1