From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: mdroth@linux.vnet.ibm.com, Michal Privoznik <mprivozn@redhat.com>,
qemu-devel@nongnu.org, vfeenstr@redhat.com,
marcandre.lureau@gmail.com, sw@weilnetz.de, pbonzini@redhat.com
Subject: Re: [PATCH v2 1/2] util: Introduce qemu_get_host_name()
Date: Mon, 22 Jun 2020 18:49:01 +0100 [thread overview]
Message-ID: <20200622174901.GO736373@redhat.com> (raw)
In-Reply-To: <16ab58fb-226d-5d25-19d6-c8d14b169aab@redhat.com>
On Mon, Jun 22, 2020 at 07:46:08PM +0200, Philippe Mathieu-Daudé wrote:
> On 6/22/20 7:26 PM, Michal Privoznik wrote:
> > This function offers operating system agnostic way to fetch host
> > name. It is implemented for both POSIX-like and Windows systems.
> >
> > Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
> > ---
> > include/qemu/osdep.h | 10 ++++++++++
> > util/oslib-posix.c | 32 ++++++++++++++++++++++++++++++++
> > util/oslib-win32.c | 13 +++++++++++++
> > 3 files changed, 55 insertions(+)
> >
> > diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
> > index ff7c17b857..a795d46b28 100644
> > --- a/include/qemu/osdep.h
> > +++ b/include/qemu/osdep.h
> > @@ -607,4 +607,14 @@ static inline void qemu_reset_optind(void)
> > #endif
> > }
> >
> > +/**
> > + * qemu_get_host_name:
> > + * @errp: Error object
> > + *
> > + * Operating system agnostic way of querying host name.
> > + *
> > + * Returns allocated hostname (caller should free), NULL on failure.
>
> free -> g_free?
free & g_free are guaranteed interchangable, given our min glib2 version.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2020-06-22 17:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-22 17:25 [PATCH v2 0/2] qga: Ditch g_get_host_name() Michal Privoznik
2020-06-22 17:26 ` Michal Privoznik
2020-06-22 17:26 ` [PATCH v2 1/2] util: Introduce qemu_get_host_name() Michal Privoznik
2020-06-22 17:38 ` Daniel P. Berrangé
2020-06-22 17:53 ` Michal Privoznik
2020-06-22 17:54 ` Daniel P. Berrangé
2020-06-22 17:46 ` Philippe Mathieu-Daudé
2020-06-22 17:49 ` Daniel P. Berrangé [this message]
2020-06-22 17:26 ` [PATCH v2 2/2] qga: Use qemu_get_host_name() instead of g_get_host_name() Michal Privoznik
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=20200622174901.GO736373@redhat.com \
--to=berrange@redhat.com \
--cc=marcandre.lureau@gmail.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=mprivozn@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=sw@weilnetz.de \
--cc=vfeenstr@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).