examples: add nfs-io example
[deb_libnfs.git] / lib / libnfs.c
index ec11ba5558ca30d592eea1069ee3e322e08864e2..e2c2c029354d49cdbae85188c66c580d7b3c4b53 100644 (file)
@@ -173,7 +173,7 @@ char *nfs_get_error(struct nfs_context *nfs)
        return rpc_get_error(nfs->rpc);
 };
 
-static struct nfs_url *nfs_parse_url(struct nfs_context *nfs, char *url, int dir, int incomplete)
+static struct nfs_url *nfs_parse_url(struct nfs_context *nfs, const char *url, int dir, int incomplete)
 {
        struct nfs_url *urls;
        char *strp, *flagsp, *strp2;
@@ -280,6 +280,13 @@ flags:
                if (strp2) {
                        *strp2 = 0;
                        strp2++;
+                       if (!strncmp(strp, "tcp-syncnt", 10)) {
+                               rpc_set_tcp_syncnt(nfs->rpc, atoi(strp2));
+                       } else if (!strncmp(strp, "uid", 3)) {
+                               rpc_set_uid(nfs->rpc, atoi(strp2));
+                       } else if (!strncmp(strp, "gid", 3)) {
+                               rpc_set_gid(nfs->rpc, atoi(strp2));
+                       }
                }
        }