qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Zhao Liu <zhao1.liu@linux.intel.com>
To: Eric Farman <farman@linux.ibm.com>
Cc: "Matthew Rosato" <mjrosato@linux.ibm.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Halil Pasic" <pasic@linux.ibm.com>,
	"Christian Borntraeger" <borntraeger@linux.ibm.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"David Hildenbrand" <david@redhat.com>,
	"Ilya Leoshkevich" <iii@linux.ibm.com>,
	qemu-s390x@nongnu.org, qemu-devel@nongnu.org,
	"C�dric Le Goater" <clg@redhat.com>,
	"Zhao Liu" <zhao1.liu@intel.com>
Subject: Re: [PATCH 0/2] hw/s390x/ccw: Cleanup basename() and dirname()
Date: Fri, 22 Dec 2023 10:41:28 +0800	[thread overview]
Message-ID: <ZYT3WBiRt3g5txTh@intel.com> (raw)
In-Reply-To: <8dbcecb47de387fa95ea4e8381bcd7e135cd9912.camel@linux.ibm.com>

On Thu, Dec 21, 2023 at 04:29:31PM -0500, Eric Farman wrote:
> Date: Thu, 21 Dec 2023 16:29:31 -0500
> From: Eric Farman <farman@linux.ibm.com>
> Subject: Re: [PATCH 0/2] hw/s390x/ccw: Cleanup basename() and dirname()
> 
> On Fri, 2023-12-22 at 01:19 +0800, Zhao Liu wrote:
> > From: Zhao Liu <zhao1.liu@intel.com>
> > 
> > As commit 3e015d815b3f ("use g_path_get_basename instead of
> > basename")
> > said, g_path_get_basename() and g_path_get_dirname() should be
> > preferred
> > over basename() and dirname(), since g_path_get_basename() and
> > g_path_get_dirname() are portable utility functions that have the
> > advantage of not modifing the string argument.
> > 
> > But commit 3e015d815b3f missed a use of dirname() and basename() in
> > hw/s390x/ccw.
> > 
> > And basename() (in vfio/container) caused compile breakage with the
> > Musl
> > C library [1].
> > 
> > To avoid similar breakage and improve portability, replace basename()
> > and dirname() with g_path_get_basename() and g_path_get_dirname().
> > 
> > [1]:
> > https://lore.kernel.org/all/20231212010228.2701544-1-raj.khem@gmail.com/
> > 
> > ---
> > Zhao Liu (2):
> >   hw/s390x/ccw: Replace basename() with g_path_get_basename()
> >   hw/s390x/ccw: Replace dirname() with g_path_get_dirname()
> > 
> >  hw/s390x/s390-ccw.c | 7 +++++--
> >  1 file changed, 5 insertions(+), 2 deletions(-)
> > 
> 
> Reviewed-by: Eric Farman <farman@linux.ibm.com>

Thanks Eric!

-Zhao



      reply	other threads:[~2023-12-22  2:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-21 17:19 [PATCH 0/2] hw/s390x/ccw: Cleanup basename() and dirname() Zhao Liu
2023-12-21 17:19 ` [PATCH 1/2] hw/s390x/ccw: Replace basename() with g_path_get_basename() Zhao Liu
2024-01-02  8:29   ` Cédric Le Goater
2023-12-21 17:19 ` [PATCH 2/2] hw/s390x/ccw: Replace dirname() with g_path_get_dirname() Zhao Liu
2024-01-02  8:29   ` Cédric Le Goater
2023-12-21 21:29 ` [PATCH 0/2] hw/s390x/ccw: Cleanup basename() and dirname() Eric Farman
2023-12-22  2:41   ` Zhao Liu [this message]

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=ZYT3WBiRt3g5txTh@intel.com \
    --to=zhao1.liu@linux.intel.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=clg@redhat.com \
    --cc=david@redhat.com \
    --cc=farman@linux.ibm.com \
    --cc=iii@linux.ibm.com \
    --cc=mjrosato@linux.ibm.com \
    --cc=pasic@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.com \
    --cc=zhao1.liu@intel.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).