* i.e. zdrmem_create() buffers.
* It aims to be compatible with normal rpcgen generated functions.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#ifdef WIN32
#include "win32_compat.h"
#endif
#include "aros_compat.h"
#endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+
#include <stdlib.h>
#include <string.h>
#include <time.h>
+#include <unistd.h>
#include "libnfs-zdr.h"
+#include "libnfs.h"
+#include "libnfs-raw.h"
+#include "libnfs-private.h"
struct opaque_auth _null_auth;
#include <string.h>
#include <assert.h>
#include <errno.h>
+#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
{
struct nfs_cb_data *data = private_data;
struct nfs_context *nfs = data->nfs;
- struct nfsfh *nfsfh;
+ struct nfsfh *nfsfh = data->nfsfh;
SETATTR3res *res;
assert(rpc->magic == RPC_CONTEXT_MAGIC);
return;
}
- data->cb(0, nfs, data->nfsfh, data->private_data);
+ data->cb(0, nfs, nfsfh, data->private_data);
free_nfs_cb_data(data);
}
int nfs_chmod_async(struct nfs_context *nfs, const char *path, int mode, nfs_cb cb, void *private_data)
{
- return nfs_chown_async_internal(nfs, path, 0, mode, cb, private_data);
+ return nfs_chmod_async_internal(nfs, path, 0, mode, cb, private_data);
}
int nfs_lchmod_async(struct nfs_context *nfs, const char *path, int mode, nfs_cb cb, void *private_data)
{
- return nfs_chown_async_internal(nfs, path, 1, mode, cb, private_data);
+ return nfs_chmod_async_internal(nfs, path, 1, mode, cb, private_data);
}
/*
case NFS3ERR_ROFS: return -EROFS; break;
case NFS3ERR_MLINK: return -EMLINK; break;
case NFS3ERR_NAMETOOLONG: return -ENAMETOOLONG; break;
- case NFS3ERR_NOTEMPTY: return -EEXIST; break;
+ case NFS3ERR_NOTEMPTY: return -ENOTEMPTY; break;
case NFS3ERR_DQUOT: return -ERANGE; break;
case NFS3ERR_STALE: return -EIO; break;
case NFS3ERR_REMOTE: return -EIO; break;