X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=include%2Fnfsc%2Flibnfs.h;h=5d5d54264d94be7d9f84f646e9b3491264a8fc56;hb=fc08ac459cbeb3fc2fba47a5aee83b843de1e1ab;hp=f2d8cb0537b3ae6658f258a4b2f397729660a44e;hpb=3ca2aac9a4aceac602684847f756428439bf814d;p=deb_libnfs.git diff --git a/include/nfsc/libnfs.h b/include/nfsc/libnfs.h index f2d8cb0..5d5d542 100644 --- a/include/nfsc/libnfs.h +++ b/include/nfsc/libnfs.h @@ -270,6 +270,10 @@ struct nfs_stat_64 { uint64_t nfs_atime; uint64_t nfs_mtime; uint64_t nfs_ctime; + uint64_t nfs_atime_nsec; + uint64_t nfs_mtime_nsec; + uint64_t nfs_ctime_nsec; + uint64_t nfs_used; }; /* @@ -682,6 +686,33 @@ EXTERN int nfs_creat_async(struct nfs_context *nfs, const char *path, int mode, */ EXTERN int nfs_creat(struct nfs_context *nfs, const char *path, int mode, struct nfsfh **nfsfh); +/* + * Async create() + * + * Same as nfs_creat_async but allows passing flags: + * O_APPEND + * O_SYNC + * O_EXCL + * + * 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 a struct *nfsfh; + * -errno : An error occured. + * data is the error string. + */ +EXTERN int nfs_create_async(struct nfs_context *nfs, const char *path, int flags, int mode, nfs_cb cb, void *private_data); +/* + * Sync create() + * Function returns + * 0 : Success + * -errno : An error occured. + */ +EXTERN int nfs_create(struct nfs_context *nfs, const char *path, int flags, int mode, struct nfsfh **nfsfh); + /* * MKNOD() @@ -785,6 +816,15 @@ struct nfsdirent { struct timeval ctime; uint32_t uid; uint32_t gid; + uint32_t nlink; + uint64_t dev; + uint64_t rdev; + uint64_t blksize; + uint64_t blocks; + uint64_t used; + uint32_t atime_nsec; + uint32_t mtime_nsec; + uint32_t ctime_nsec; }; /* * nfs_readdir() never blocks, so no special sync/async versions are available