Util-Linux package development
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: util-linux-ng@vger.kernel.org
Subject: Re: Mangle functions
Date: Tue, 26 Apr 2011 13:12:28 +0200	[thread overview]
Message-ID: <20110426111228.GF29492@nb.net.home> (raw)
In-Reply-To: <alpine.LNX.2.01.1104231718050.16111@obet.zrqbmnf.qr>

On Sat, Apr 23, 2011 at 05:20:01PM +0200, Jan Engelhardt wrote:
> I see a mnt_mangle function provided by libmount, but it seems to be 
> meant for *tab columns only. Is there also a function that mangles the 
> passed string such that it can be used as an option value, i.e. encodes 
> the set " ,\t\n\\"?

 Not sure if I good understand. Do you have any example?

 Do you mean mount options? The library uses the mnt_mangle functions
 for all strings that are read/write to/from the *tab files. You don't
 have to care about " \t\n\\".
 
 The problem is comma (','), it should not be used in the strings --
 exception are SELinux mount options where comma is acceptable if the
 option uses quotes (e.g. context="aaa,bbb,ccc").

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

      reply	other threads:[~2011-04-26 11:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-23 15:20 Mangle functions Jan Engelhardt
2011-04-26 11:12 ` Karel Zak [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=20110426111228.GF29492@nb.net.home \
    --to=kzak@redhat.com \
    --cc=jengelh@medozas.de \
    --cc=util-linux-ng@vger.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