]> git.decadent.org.uk Git - nfs-utils.git/commit
mount.nfs: add new string tokenizer facility
authorChuck Lever <chuck.lever@oracle.com>
Fri, 28 Sep 2007 20:36:30 +0000 (16:36 -0400)
committerNeil Brown <neilb@suse.de>
Fri, 28 Sep 2007 21:58:56 +0000 (07:58 +1000)
commitaf5939d15a41b337cc499a04fe4001a5cd51fdce
treed051dd854e4de351288d1d9f6fe752b1509ac68a
parent7a042b78ba064a36d1c7de797d2af796212fca2e
mount.nfs: add new string tokenizer facility

To quote the strtok(3) man page: "Avoid using these functions."

OK.  We've created our own.  The main reason for this is that strtok(3)
doesn't handle quoted delimiters at all.  We need to handle this:

   context="foo,bar"

where 'context' is a single mount option that sets a token string that
possibly uses the same delimiter that the mount command uses to separate
options (that is, a comma).

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
utils/mount/Makefile.am
utils/mount/token.c [new file with mode: 0644]
utils/mount/token.h [new file with mode: 0644]