mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
NFS: Add string length argument to nfs_parse_server_address
To make nfs_parse_server_address() more generally useful, allow it to accept input strings that are not terminated with '\0'. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
d1aa082573
commit
ce3b7e1906
2 changed files with 78 additions and 31 deletions
|
@ -44,6 +44,13 @@
|
|||
|
||||
#include <linux/types.h>
|
||||
|
||||
/*
|
||||
* These mimic similar macros defined in user-space for inet_ntop(3).
|
||||
* See /usr/include/netinet/in.h .
|
||||
*/
|
||||
#define INET_ADDRSTRLEN (16)
|
||||
#define INET6_ADDRSTRLEN (48)
|
||||
|
||||
extern __be32 in_aton(const char *str);
|
||||
extern int in4_pton(const char *src, int srclen, u8 *dst, int delim, const char **end);
|
||||
extern int in6_pton(const char *src, int srclen, u8 *dst, int delim, const char **end);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue