Hook up strsep(3) to libkern following a repo-copy by Peter. This will
allow us to avoid nasty by-hand string parsing stuff in a number of places in the kernel, reducing the risk of unexpected consequences for kernel correctness.
This commit is contained in:
parent
6c3fb1121a
commit
469fda7e25
@ -1044,6 +1044,7 @@ libkern/strlcpy.c standard
|
||||
libkern/strlen.c standard
|
||||
libkern/strncmp.c standard
|
||||
libkern/strncpy.c standard
|
||||
libkern/strsep.c standard
|
||||
libkern/strtol.c standard
|
||||
libkern/strtoq.c standard
|
||||
libkern/strtoul.c standard
|
||||
|
@ -37,8 +37,8 @@ static char sccsid[] = "@(#)strsep.c 8.1 (Berkeley) 6/4/93";
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/libkern.h>
|
||||
|
||||
/*
|
||||
* Get next token from string *stringp, where tokens are possibly-empty
|
||||
|
@ -92,6 +92,7 @@ size_t strlcpy(char *, const char *, size_t);
|
||||
size_t strlen(const char *);
|
||||
int strncmp(const char *, const char *, size_t);
|
||||
char *strncpy(char *, const char *, size_t);
|
||||
char *strsep(char **, const char *delim);
|
||||
int strvalid(const char *, size_t);
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user