X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=lib%2Flibnfs.c;h=72d4df496262e8945dbb3c8a7800656207187e9f;hb=6505b5396731ca6ec1a6786fa9a67dd528cdf947;hp=2acd17213f12820d76e7be0294d49620e9faded5;hpb=1d15199152e1dfab18b86f855301ac7a0c597fab;p=deb_libnfs.git diff --git a/lib/libnfs.c b/lib/libnfs.c index 2acd172..72d4df4 100644 --- a/lib/libnfs.c +++ b/lib/libnfs.c @@ -1548,9 +1548,9 @@ static int nfs_stat64_continue_internal(struct nfs_context *nfs, fattr3 *attr _U return 0; } -int nfs_stat64_async(struct nfs_context *nfs, const char *path, nfs_cb cb, void *private_data) +int nfs_stat64_async_internal(struct nfs_context *nfs, const char *path, int no_follow, nfs_cb cb, void *private_data) { - if (nfs_lookuppath_async(nfs, path, 0, cb, private_data, nfs_stat64_continue_internal, NULL, NULL, 0) != 0) { + if (nfs_lookuppath_async(nfs, path, no_follow, cb, private_data, nfs_stat64_continue_internal, NULL, NULL, 0) != 0) { rpc_set_error(nfs->rpc, "Out of memory: failed to start parsing the path components"); return -1; } @@ -1558,6 +1558,16 @@ int nfs_stat64_async(struct nfs_context *nfs, const char *path, nfs_cb cb, void return 0; } +int nfs_stat64_async(struct nfs_context *nfs, const char *path, nfs_cb cb, void *private_data) +{ + return nfs_stat64_async_internal(nfs, path, 0, cb, private_data); +} + +int nfs_lstat64_async(struct nfs_context *nfs, const char *path, nfs_cb cb, void *private_data) +{ + return nfs_stat64_async_internal(nfs, path, 1, cb, private_data); +} + /* * Async open() */ @@ -4076,7 +4086,7 @@ static int nfs_chown_continue_internal(struct nfs_context *nfs, fattr3 *attr _U_ } -int nfs_chown_async(struct nfs_context *nfs, const char *path, int uid, int gid, nfs_cb cb, void *private_data) +int nfs_chown_async_internal(struct nfs_context *nfs, const char *path, int no_follow, int uid, int gid, nfs_cb cb, void *private_data) { struct nfs_chown_data *chown_data; @@ -4089,7 +4099,7 @@ int nfs_chown_async(struct nfs_context *nfs, const char *path, int uid, int gid, chown_data->uid = uid; chown_data->gid = gid; - if (nfs_lookuppath_async(nfs, path, 0, cb, private_data, nfs_chown_continue_internal, chown_data, free, 0) != 0) { + if (nfs_lookuppath_async(nfs, path, no_follow, cb, private_data, nfs_chown_continue_internal, chown_data, free, 0) != 0) { rpc_set_error(nfs->rpc, "Out of memory: failed to start parsing the path components"); return -1; } @@ -4097,6 +4107,15 @@ int nfs_chown_async(struct nfs_context *nfs, const char *path, int uid, int gid, return 0; } +int nfs_chown_async(struct nfs_context *nfs, const char *path, int uid, int gid, nfs_cb cb, void *private_data) +{ + return nfs_chown_async_internal(nfs, path, 0, uid, gid, cb, private_data); +} + +int nfs_lchown_async(struct nfs_context *nfs, const char *path, int uid, int gid, nfs_cb cb, void *private_data) +{ + return nfs_chown_async_internal(nfs, path, 1, uid, gid, cb, private_data); +} /* * Async fchown() @@ -4209,8 +4228,7 @@ static int nfs_utimes_continue_internal(struct nfs_context *nfs, fattr3 *attr _U return 0; } - -int nfs_utimes_async(struct nfs_context *nfs, const char *path, struct timeval *times, nfs_cb cb, void *private_data) +int nfs_utimes_async_internal(struct nfs_context *nfs, const char *path, int no_follow, struct timeval *times, nfs_cb cb, void *private_data) { struct timeval *new_times = NULL; @@ -4224,7 +4242,7 @@ int nfs_utimes_async(struct nfs_context *nfs, const char *path, struct timeval * memcpy(new_times, times, sizeof(struct timeval)*2); } - if (nfs_lookuppath_async(nfs, path, 0, cb, private_data, nfs_utimes_continue_internal, new_times, free, 0) != 0) { + if (nfs_lookuppath_async(nfs, path, no_follow, cb, private_data, nfs_utimes_continue_internal, new_times, free, 0) != 0) { rpc_set_error(nfs->rpc, "Out of memory: failed to start parsing the path components"); return -1; } @@ -4232,6 +4250,16 @@ int nfs_utimes_async(struct nfs_context *nfs, const char *path, struct timeval * return 0; } +int nfs_utimes_async(struct nfs_context *nfs, const char *path, struct timeval *times, nfs_cb cb, void *private_data) +{ + return nfs_utimes_async_internal(nfs, path, 0, times, cb, private_data); +} + +int nfs_lutimes_async(struct nfs_context *nfs, const char *path, struct timeval *times, nfs_cb cb, void *private_data) +{ + return nfs_utimes_async_internal(nfs, path, 1, times, cb, private_data); +} + /* * Async utime() */