examples: add nfs-io example
[deb_libnfs.git] / lib / libnfs.c
index cd15fb01eabe0bcc4fa722f33d322d6ad719ba38..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;
@@ -282,6 +282,10 @@ flags:
                        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));
                        }
                }
        }