mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Abhinav Jain <jain.abhinav177@gmail.com>
To: bmarzins@redhat.com
Cc: agk@redhat.com, dm-devel@lists.linux.dev,
	jain.abhinav177@gmail.com, javier.carrasco.cruz@gmail.com,
	linux-kernel@vger.kernel.org, mpatocka@redhat.com,
	skhan@linuxfoundation.org, snitzer@kernel.org
Subject: Re: [PATCH] dm: Add support for escaped characters in str_field_delimit()
Date: Thu, 13 Jun 2024 16:30:15 +0000	[thread overview]
Message-ID: <20240613163015.38097-1-jain.abhinav177@gmail.com> (raw)
In-Reply-To: <Zmc3vrfFglYISw1P@redhat.com>

On Mon, Jun 10, 2024 at 01:11:40PM -0400, Benjamin Marzinski wrote:
> This doesn't do anything to the escape character. Presumably you want to
> pass the field containing a separator down to dm_eary_create(). But you
> don't want to pass the escape character itself.
>
> To work correctly, this code needs to remove all those escape characters
> that come before separators. It probably needs to do something like:
>
> 1. Find a next non-escaped separator and change it to NULL, so you have
> your field string.
>
> 2. Find all the escaped separators in the field string, and shift the
> rest of the string over to overwrite the escape character with the rest
> of the string.
>
> -Ben

Hi Ben,

I realised I should have done better testing after processing your feedback.
I have accordingly modified the code and shared a v2:
https://lore.kernel.org/all/20240613162632.38065-1-jain.abhinav177@gmail.com/

Please help review and provide feedback again. Thanks.

      reply	other threads:[~2024-06-13 16:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-09 14:17 Abhinav Jain
2024-06-10 17:11 ` Benjamin Marzinski
2024-06-10 17:28   ` Benjamin Marzinski
2024-06-13 16:30     ` Abhinav Jain [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=20240613163015.38097-1-jain.abhinav177@gmail.com \
    --to=jain.abhinav177@gmail.com \
    --cc=agk@redhat.com \
    --cc=bmarzins@redhat.com \
    --cc=dm-devel@lists.linux.dev \
    --cc=javier.carrasco.cruz@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpatocka@redhat.com \
    --cc=skhan@linuxfoundation.org \
    --cc=snitzer@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®