* Mangle functions
@ 2011-04-23 15:20 Jan Engelhardt
2011-04-26 11:12 ` Karel Zak
0 siblings, 1 reply; 2+ messages in thread
From: Jan Engelhardt @ 2011-04-23 15:20 UTC (permalink / raw)
To: kzak; +Cc: util-linux-ng
Hej,
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\\"?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Mangle functions
2011-04-23 15:20 Mangle functions Jan Engelhardt
@ 2011-04-26 11:12 ` Karel Zak
0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2011-04-26 11:12 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: util-linux-ng
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-04-26 11:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-23 15:20 Mangle functions Jan Engelhardt
2011-04-26 11:12 ` Karel Zak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox