Skip to contentSkip to conversation

hmp: solve '\n' in monitor_printf()

PATCH Applied Mike Qiu 3 participants 5 messages Oct 17, 2013

lore
Share & tools
lore

Mike Qiu

author
#0 lore raw

PATCH v2 1/1 hmp: solve '\n' in monitor_printf()

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.

---
 hmp.c | 2 --
 1 file changed, 2 deletions(-)
hmp.c +0 -2
index 5891507..32ee285 100644
@@ -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) {
Signature · 1 line
1.8.3.1
Reviewed-by on v2 1/1
#1 lore raw

Am 17.10.2013 um 05:16 hat Mike Qiu geschrieben:

Quoted 2 lines

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.

Quoted 16 lines

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.

Quoted 6 lines

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.

author
#2 lore raw
Quoted 6 lines · Kevin Wolf

Am 17.10.2013 um 05:16 hat Mike Qiu geschrieben:

Quoted 2 lines

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

Quoted 26 lines
Quoted 16 lines

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.

Quoted 6 lines

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.

#3 lore raw
In reply to Mike Qiu
Quoted 22 lines · Mike Qiu

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.

Quoted 6 lines

This patch is to solve this.

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

author
#4 lore raw
Quoted 29 lines · Stefan Hajnoczi
Quoted 22 lines · Mike Qiu

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.

Quoted 6 lines

This patch is to solve this.

---
  hmp.c | 2 --
  1 file changed, 2 deletions(-)
Quoted 5 lines

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

Quoted 6 lines

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

Stefan