[lkml]   [2001]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: More better in mount(2)
Nathan Scott wrote:
> On Jan 5, 3:26am, Daniel Phillips wrote:
> > ...
> > This filesystem mount option parsing code is completely ad hoc, and uses
> > strtok which is horribly horribly broken. (Do man strtok and read the
> > 'Bugs' section.)
> >
> > It would be worth thinking about how to do this better.
> hmm ... can't claim I wrote this code, just looked at it.
> are you saying the kernel strtok is horribly broken or just
> the way its being used here? (and why?)

From the man page:

BUGS Never use this function. If you do, note that:
This function modifies its first argument.
The identity of the delimiting character is lost.
This functions cannot be used on constant strings.
The strtok () function uses a static buffer while
parsing, so it's not thread safe. Use strtok_r ()
if this matters to
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:52    [W:0.046 / U:5.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site