All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Seeteena Thoufeek <s1seetee@linux.vnet.ibm.com>, lma@suse.com
Cc: qemu-devel@nongnu.org, mreitz@redhat.com
Subject: Re: [Qemu-devel] [PATCH v1] hmp: 'info snapshots' not showing the id
Date: Tue, 12 Dec 2017 16:41:15 +0000	[thread overview]
Message-ID: <20171212164114.GF2409@work-vm> (raw)
In-Reply-To: <1511273358-21789-1-git-send-email-s1seetee@linux.vnet.ibm.com>

* Seeteena Thoufeek (s1seetee@linux.vnet.ibm.com) wrote:
> (qemu) info snapshots
> List of snapshots present on all disks:
> ID        TAG                 VM SIZE                DATE       VM CLOCK
> --         1                      314M 2017-11-15 15:22:18   00:02:25.695
> --         2                      319M 2017-11-15 15:23:03   00:02:45.970
> --         3                      319M 2017-11-15 15:23:37   00:02:56.328
> 
> ID field is showing -- with no information.
> 
> Signed-off-by: Seeteena Thoufeek <s1seetee@linux.vnet.ibm.com>

Hi Seeteena,
  Your change doesn't seem to be consistent with the comment above it.
I don't know the detailed history of snapshots, but that comment and the
pstrcpy comes from Lin Ma's commit 3a1ee711 which seems to be saying the
ID can't be trusted.

Dave

> ---
>  hmp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hmp.c b/hmp.c
> index 35a7041..1921b3b 100644
> --- a/hmp.c
> +++ b/hmp.c
> @@ -1454,7 +1454,7 @@ void hmp_info_snapshots(Monitor *mon, const QDict *qdict)
>              /* The ID is not guaranteed to be the same on all images, so
>               * overwrite it.
>               */
> -            pstrcpy(sn->id_str, sizeof(sn->id_str), "--");
> +            pstrcpy(sn->id_str, sizeof(sn->id_str), sn->id_str);
>              bdrv_snapshot_dump((fprintf_function)monitor_printf, mon, sn);
>              monitor_printf(mon, "\n");
>          }
> -- 
> 1.8.3.1
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

  reply	other threads:[~2017-12-12 16:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-21 14:09 [Qemu-devel] [PATCH v1] hmp: 'info snapshots' not showing the id Seeteena Thoufeek
2017-12-12 16:41 ` Dr. David Alan Gilbert [this message]
2017-12-13  4:50   ` seeteena
2017-12-15  9:18     ` Max Reitz
2017-12-18  9:24       ` seeteena
2017-12-19 14:20         ` Max Reitz
2017-12-20  4:34           ` seeteena
2017-12-20 13:18           ` Dr. David Alan Gilbert
2017-12-21 23:14           ` Eric Blake
2017-12-22  7:37             ` Markus Armbruster
2018-01-02  6:42               ` seeteena
2018-01-02  8:24                 ` Markus Armbruster
2018-01-04 16:24                   ` seeteena

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171212164114.GF2409@work-vm \
    --to=dgilbert@redhat.com \
    --cc=lma@suse.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=s1seetee@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.