All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony PERARD <anthony.perard@citrix.com>
To: Jason Andryuk <jandryuk@gmail.com>
Cc: Juergen Gross <jgross@suse.com>, <xen-devel@lists.xenproject.org>,
	Wei Liu <wl@xen.org>
Subject: Re: [PATCH v2 2/3] tools/xl: make split_string_into_pair() more usable
Date: Wed, 22 Mar 2023 17:28:54 +0000	[thread overview]
Message-ID: <326177a0-730d-422d-a4bd-fa99eaf81770@perard> (raw)
In-Reply-To: <CAKf6xpvG5+OGJ1iivOAqO7mAf+SfsimMgdfjEh1F36AfatUUkA@mail.gmail.com>

On Wed, Mar 22, 2023 at 08:29:51AM -0400, Jason Andryuk wrote:
> On Wed, Mar 22, 2023 at 3:35 AM Juergen Gross <jgross@suse.com> wrote:
> >
> > Today split_string_into_pair() will not really do what its name is
> > suggesting: instead of splitting a string into a pair of strings using
> > a delimiter, it will return the first two strings of the initial string
> > by using the delimiter.
> >
> > This is never what the callers want, so modify split_string_into_pair()
> > to split the string only at the first delimiter found, resulting in
> > something like "x=a=b" to be split into "x" and "a=b" when being called
> > with "=" as the delimiter. Today the returned strings would be "x" and
> > "a".
> >
> > At the same time switch the delimiter from "const char *" (allowing
> > multiple delimiter characters) to "char" (a single character only), as
> > this makes the function more simple without breaking any use cases.
> >
> > Suggested-by: Anthony PERARD <anthony.perard@citrix.com>
> > Signed-off-by: Juergen Gross <jgross@suse.com>
> 
> Reviewed-by: Jason Andryuk <jandryuk@gmail.com>

Acked-by: Anthony PERARD <anthony.perard@citrix.com>

Thanks,

-- 
Anthony PERARD


  reply	other threads:[~2023-03-22 17:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-22  7:34 [PATCH v2 0/3] tools/xl: small cleanup of parsing code Juergen Gross
2023-03-22  7:34 ` [PATCH v2 1/3] tools/xl: allow split_string_into_pair() to trim values Juergen Gross
2023-03-22  7:34 ` [PATCH v2 2/3] tools/xl: make split_string_into_pair() more usable Juergen Gross
2023-03-22 12:29   ` Jason Andryuk
2023-03-22 17:28     ` Anthony PERARD [this message]
2023-03-22  7:34 ` [PATCH v2 3/3] tools/xl: rework p9 config parsing Juergen Gross
2023-03-22 12:32   ` Jason Andryuk
2023-03-22 17:29     ` Anthony PERARD

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=326177a0-730d-422d-a4bd-fa99eaf81770@perard \
    --to=anthony.perard@citrix.com \
    --cc=jandryuk@gmail.com \
    --cc=jgross@suse.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /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.