X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=include%2Fnfsc%2Flibnfs.h;h=a806fdb3ebc12c54b52691e3422e126776b28c5e;hb=5935a28a0e8cb9751f89ed7085b8e1d37c44d9d1;hp=df102d92985fd377976429827408f6d9eb732bca;hpb=3e020c15fd041aea4918103c00c9143a0667c79b;p=deb_libnfs.git diff --git a/include/nfsc/libnfs.h b/include/nfsc/libnfs.h index df102d9..a806fdb 100644 --- a/include/nfsc/libnfs.h +++ b/include/nfsc/libnfs.h @@ -364,7 +364,7 @@ EXTERN int nfs_fstat64(struct nfs_context *nfs, struct nfsfh *nfsfh, struct nfs_ * Async open() * * mode is a combination of the flags : - * O_RDOLNY, O_WRONLY, O_RDWR , O_SYNC, O_APPEND + * O_RDOLNY, O_WRONLY, O_RDWR , O_SYNC, O_APPEND, O_TRUNC * * Function returns * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. @@ -375,6 +375,7 @@ EXTERN int nfs_fstat64(struct nfs_context *nfs, struct nfsfh *nfsfh, struct nfs_ * O_RDONLY * O_WRONLY * O_RDWR + * O_SYNC * O_TRUNC (Only valid with O_RDWR or O_WRONLY. Ignored otherwise.) * * When the callback is invoked, status indicates the result: @@ -723,6 +724,7 @@ EXTERN int nfs_creat(struct nfs_context *nfs, const char *path, int mode, struct * O_APPEND * O_SYNC * O_EXCL + * O_TRUNC * * Function returns * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. @@ -1045,6 +1047,34 @@ EXTERN int nfs_chown_async(struct nfs_context *nfs, const char *path, int uid, i * -errno : The command failed. */ EXTERN int nfs_chown(struct nfs_context *nfs, const char *path, int uid, int gid); +/* + * Async chown() + * + * Like chown except if the destination is a symbolic link, it acts on the + * symbolic link itself. + * + * Function returns + * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. + * <0 : An error occured when trying to set up the operation. The callback will not be invoked. + * + * When the callback is invoked, status indicates the result: + * 0 : Success. + * data is NULL + * -errno : An error occured. + * data is the error string. + */ +EXTERN int nfs_lchown_async(struct nfs_context *nfs, const char *path, int uid, int gid, nfs_cb cb, void *private_data); +/* + * Sync chown() + * + * Like chown except if the destination is a symbolic link, it acts on the + * symbolic link itself. + * + * Function returns + * 0 : The operation was successfull. + * -errno : The command failed. + */ +EXTERN int nfs_lchown(struct nfs_context *nfs, const char *path, int uid, int gid);