[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] hmp: Add '\n' in monitor_printf()
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH] hmp: Add '\n' in monitor_printf() |
Date: |
Mon, 14 Oct 2013 16:36:18 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) |
Mike Qiu <address@hidden> writes:
> Without this, 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 scsi0-cd2,
> and break the info style.
Just saw a similar one:
(qemu) info block
disk0: test.img (raw)
[not inserted]
cd: [not inserted]
Removable device: not locked, tray closed
foo: tmp.img (raw)
Removable device: not locked, tray closed
[not inserted](qemu)
> This patch is to solve this.
>
> Signed-off-by: Mike Qiu <address@hidden>
> ---
> hmp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hmp.c b/hmp.c
> index 5891507..2d2e5f8 100644
> --- a/hmp.c
> +++ b/hmp.c
> @@ -367,7 +367,7 @@ void hmp_info_block(Monitor *mon, const QDict *qdict)
> info->value->inserted->iops_wr_max,
> info->value->inserted->iops_size);
> } else {
> - monitor_printf(mon, " [not inserted]");
> + monitor_printf(mon, " [not inserted]\n");
> }
>
> if (verbose) {
monitor_printf(mon, "\nImages:\n");
What about removing the newline before "Images"?
I think we should also drop this newline:
if (info->value->removable) {
monitor_printf(mon, " Removable device: %slocked, tray %s\n",
info->value->locked ? "" : "not ",
info->value->tray_open ? "open" : "closed");
}
Maybe more. The function probably needs a systematic newline review.
- [Qemu-devel] [PATCH] hmp: Add '\n' in monitor_printf(), Mike Qiu, 2013/10/14
- Re: [Qemu-devel] [PATCH] hmp: Add '\n' in monitor_printf(),
Markus Armbruster <=
- Re: [Qemu-devel] [PATCH] hmp: Add '\n' in monitor_printf(), mike, 2013/10/14
- Re: [Qemu-devel] [PATCH] hmp: Add '\n' in monitor_printf(), mike, 2013/10/15
- Re: [Qemu-devel] [PATCH] hmp: Add '\n' in monitor_printf(), BenoƮt Canet, 2013/10/15
- Re: [Qemu-devel] [PATCH] hmp: Add '\n' in monitor_printf(), Wenchao Xia, 2013/10/16
- Re: [Qemu-devel] [PATCH] hmp: Add '\n' in monitor_printf(), Markus Armbruster, 2013/10/16
- Re: [Qemu-devel] [PATCH] hmp: Add '\n' in monitor_printf(), Wenchao Xia, 2013/10/16
- Re: [Qemu-devel] [PATCH] hmp: Add '\n' in monitor_printf(), mike, 2013/10/16