url: add support for server:port syntax in the url
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>master
parent
cdb377532a
commit
752cb4134d
2
README
2
README
|
@ -40,7 +40,7 @@ URL-FORMAT:
|
|||
Libnfs uses RFC2224 style URLs extended with some minor libnfs extensions.
|
||||
The basic syntax of these URLs is :
|
||||
|
||||
nfs://<server|ipv4|ipv6>/path[?arg=val[&arg=val]*]
|
||||
nfs://<server|ipv4|ipv6>[:<port>]/path[?arg=val[&arg=val]*]
|
||||
|
||||
Arguments supported by libnfs are :
|
||||
tcp-syncnt=<int> : Number of SYNs to send during the session establish
|
||||
|
|
|
@ -358,6 +358,12 @@ nfs_parse_url(struct nfs_context *nfs, const char *url, int dir, int incomplete)
|
|||
}
|
||||
*strp = 0;
|
||||
|
||||
strp = strchr(urls->server, ':');
|
||||
if (strp) {
|
||||
*strp++ = 0;
|
||||
nfs->nfsport = atoi(strp);
|
||||
}
|
||||
|
||||
if (dir) {
|
||||
flagsp = strchr(urls->path, '?');
|
||||
goto flags;
|
||||
|
|
Loading…
Reference in New Issue