diff --git a/README b/README index e321af4..d3e37b2 100644 --- a/README +++ b/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:///path[?arg=val[&arg=val]*] +nfs://[:]/path[?arg=val[&arg=val]*] Arguments supported by libnfs are : tcp-syncnt= : Number of SYNs to send during the session establish diff --git a/lib/libnfs.c b/lib/libnfs.c index 9c8045b..4681728 100755 --- a/lib/libnfs.c +++ b/lib/libnfs.c @@ -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;