Rename the nfs_open() argument from mode to flags
[deb_libnfs.git] / lib / libnfs.c
index d4ad029574a497b9dcc04fe80247ca01bce4b6cb..bfb1b7ce70bba59dd312c0bd7bdd79935886b820 100644 (file)
@@ -1099,8 +1099,7 @@ static int nfs_lookuppath_async(struct nfs_context *nfs, const char *path, nfs_c
        struct nfs_cb_data *data;
 
        if (path[0] == '\0') {
-               rpc_set_error(nfs->rpc, "Path is empty");
-               return -1;
+               path = ".";
        }
 
        data = malloc(sizeof(struct nfs_cb_data));
@@ -1347,9 +1346,9 @@ static int nfs_open_continue_internal(struct nfs_context *nfs, struct nfs_cb_dat
        return 0;
 }
 
-int nfs_open_async(struct nfs_context *nfs, const char *path, int mode, nfs_cb cb, void *private_data)
+int nfs_open_async(struct nfs_context *nfs, const char *path, int flags, nfs_cb cb, void *private_data)
 {
-       if (nfs_lookuppath_async(nfs, path, cb, private_data, nfs_open_continue_internal, NULL, NULL, mode) != 0) {
+       if (nfs_lookuppath_async(nfs, path, cb, private_data, nfs_open_continue_internal, NULL, NULL, flags) != 0) {
                rpc_set_error(nfs->rpc, "Out of memory: failed to start parsing the path components");
                return -1;
        }