From: "Tomáš Golembiovský" <tgolembi@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
"Blake, Eric" <eblake@redhat.com>,
sjubran@redhat.com, okrishtal@virtuozzo.com,
Michael Roth <mdroth@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH v4 11/11] qga-win: demystify namespace striping
Date: Tue, 9 Oct 2018 14:38:38 +0200 [thread overview]
Message-ID: <20181009143838.23f19a4c@fiorina> (raw)
In-Reply-To: <CAMxuvayviBgZXJJRiXNTd9Z2=tJZtkSjL-8RJODRM9NAtUufgA@mail.gmail.com>
On Thu, 4 Oct 2018 17:20:50 +0400
Marc-André Lureau <marcandre.lureau@redhat.com> wrote:
> Hi
>
> On Thu, Oct 4, 2018 at 3:22 PM Tomáš Golembiovský <tgolembi@redhat.com> wrote:
> >
> > It was not obvious what exactly the cryptic string copying does to the
> > GUID. This change makes the intent clearer.
> >
> > Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com>
>
> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> > ---
> > qga/commands-win32.c | 9 ++++++++-
> > 1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/qga/commands-win32.c b/qga/commands-win32.c
> > index d0d969d0ce..82881aa749 100644
> > --- a/qga/commands-win32.c
> > +++ b/qga/commands-win32.c
> > @@ -507,7 +507,14 @@ static GuestPCIAddress *get_pci_info(char *guid, Error **errp)
> > char dev_name[MAX_PATH];
> > char *buffer = NULL;
> > GuestPCIAddress *pci = NULL;
> > - char *name = g_strdup(&guid[4]);
> > + char *name = NULL;
> > +
> > + if ((g_str_has_prefix(guid, "\\\\.\\") == TRUE) ||
> > + (g_str_has_prefix(guid, "\\\\?\\") == TRUE)) {
> > + name = g_strdup(&guid[4]);
>
> I find "guid + 4" easier to read though
I will change that, no problem.
>
> > + } else {
> > + name = g_strdup(guid);
> > + }
> >
> > if (!QueryDosDevice(name, dev_name, ARRAY_SIZE(dev_name))) {
> > error_setg_win32(errp, GetLastError(), "failed to get dos device name");
> > --
> > 2.19.0
> >
--
Tomáš Golembiovský <tgolembi@redhat.com>
next prev parent reply other threads:[~2018-10-10 8:29 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-04 11:22 [Qemu-devel] [PATCH v4 00/11] qga: report serial number and disk node Tomáš Golembiovský
2018-10-04 11:22 ` [Qemu-devel] [PATCH v4 01/11] qga-win: fix crashes when PCI info cannot be retrived Tomáš Golembiovský
2018-10-04 13:21 ` Marc-André Lureau
2018-10-09 11:07 ` Tomáš Golembiovský
2018-10-10 23:35 ` Michael Roth
2018-10-11 1:04 ` Eric Blake
2018-10-04 11:22 ` [Qemu-devel] [PATCH v4 02/11] qga-win: handle NULL values Tomáš Golembiovský
2018-10-04 13:21 ` Marc-André Lureau
2018-10-10 23:08 ` Michael Roth
2018-10-04 11:22 ` [Qemu-devel] [PATCH v4 03/11] build: rename CONFIG_QGA_NTDDDISK to CONFIG_QGA_NTDDSCSI Tomáš Golembiovský
2018-10-04 13:21 ` Marc-André Lureau
2018-10-07 9:29 ` Sameeh Jubran
2018-10-04 11:22 ` [Qemu-devel] [PATCH v4 04/11] qga-win: add debugging information Tomáš Golembiovský
2018-10-04 13:21 ` Marc-André Lureau
2018-10-04 11:22 ` [Qemu-devel] [PATCH v4 05/11] qga-win: refactor disk properties (bus) Tomáš Golembiovský
2018-10-04 13:21 ` Marc-André Lureau
2018-10-04 11:22 ` [Qemu-devel] [PATCH v4 06/11] configure: add test for libudev Tomáš Golembiovský
2018-10-04 13:21 ` Marc-André Lureau
2018-10-04 11:22 ` [Qemu-devel] [PATCH v4 07/11] qga: report disk serial number Tomáš Golembiovský
2018-10-04 13:21 ` Marc-André Lureau
2018-10-04 11:22 ` [Qemu-devel] [PATCH v4 08/11] qga-win: refactor disk info Tomáš Golembiovský
2018-10-04 11:22 ` [Qemu-devel] [PATCH v4 09/11] qga-win: handle multi-disk volumes Tomáš Golembiovský
2018-10-07 12:13 ` Sameeh Jubran
2018-10-10 14:57 ` Tomáš Golembiovský
2018-10-04 11:22 ` [Qemu-devel] [PATCH v4 10/11] qga: return disk device in guest-get-fsinfo Tomáš Golembiovský
2018-10-04 13:20 ` Marc-André Lureau
2018-10-04 11:22 ` [Qemu-devel] [PATCH v4 11/11] qga-win: demystify namespace striping Tomáš Golembiovský
2018-10-04 13:20 ` Marc-André Lureau
2018-10-07 11:03 ` Sameeh Jubran
2018-10-09 12:38 ` Tomáš Golembiovský [this message]
2018-10-10 17:19 ` Eric Blake
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=20181009143838.23f19a4c@fiorina \
--to=tgolembi@redhat.com \
--cc=eblake@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=okrishtal@virtuozzo.com \
--cc=qemu-devel@nongnu.org \
--cc=sjubran@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).