diff mbox

[v2] hmp: solve '\n' in monitor_printf()

Message ID 1381979761-2180-1-git-send-email-qiudayu@linux.vnet.ibm.com
State New
Headers show

Commit Message

Mike Qiu Oct. 17, 2013, 3:16 a.m. UTC
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 <qiudayu@linux.vnet.ibm.com>
---
 hmp.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Kevin Wolf Oct. 17, 2013, 8:11 a.m. UTC | #1
Am 17.10.2013 um 05:16 hat Mike Qiu geschrieben:
> Change to v1:
> 	remove '[not inserted]' line instead of adding '\n'

Please put such notes for reviewers below the --- line, so that git am
automatically removes them and they don't end up in the git commit
message.

> 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 <qiudayu@linux.vnet.ibm.com>

Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Stefan Hajnoczi Oct. 17, 2013, 8:14 a.m. UTC | #2
On Wed, Oct 16, 2013 at 11:16:01PM -0400, Mike Qiu wrote:
> 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 <qiudayu@linux.vnet.ibm.com>
> ---
>  hmp.c | 2 --
>  1 file changed, 2 deletions(-)

The commit message is out-of-date, this patch now drops the bogus "[not
inserted]" output.  I fixed up the commit message.

In the future, please put the patch changelog after the "---" line so
that git am does not include the changelog in the commit description.

Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block

Stefan
Mike Qiu Oct. 17, 2013, 8:34 a.m. UTC | #3
On 10/17/2013 04:14 PM, Stefan Hajnoczi wrote:
> On Wed, Oct 16, 2013 at 11:16:01PM -0400, Mike Qiu wrote:
>> 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 <qiudayu@linux.vnet.ibm.com>
>> ---
>>   hmp.c | 2 --
>>   1 file changed, 2 deletions(-)
> The commit message is out-of-date, this patch now drops the bogus "[not
> inserted]" output.  I fixed up the commit message.
>
> In the future, please put the patch changelog after the "---" line so
> that git am does not include the changelog in the commit description.
OK, Got it, thanks for your kindly remind :)

Thanks
Mike
> Thanks, applied to my block tree:
> https://github.com/stefanha/qemu/commits/block
>
> Stefan
>
>
Mike Qiu Oct. 17, 2013, 8:35 a.m. UTC | #4
On 10/17/2013 04:11 PM, Kevin Wolf wrote:
> Am 17.10.2013 um 05:16 hat Mike Qiu geschrieben:
>> Change to v1:
>> 	remove '[not inserted]' line instead of adding '\n'
> Please put such notes for reviewers below the --- line, so that git am
> automatically removes them and they don't end up in the git commit
> message.
OK, thanks for your kindly remind,

Thanks
Mike
>> 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 <qiudayu@linux.vnet.ibm.com>
> Reviewed-by: Kevin Wolf <kwolf@redhat.com>
>
>
>
diff mbox

Patch

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) {