X-Git-Url: https://git.piment-noir.org/?p=deb_libnfs.git;a=blobdiff_plain;f=include%2Fnfsc%2Flibnfs.h;h=2149b8a8fa8ebe1fffe4cc7700569aae7f8f1c93;hp=d3ce1aa4801366545cdd376c4742cc1c0e3f43d5;hb=42f916635d2d799c1d3c923a377f40f100c0633c;hpb=0672f75b57b9e0fbf56079944fde5b2fc9de27be diff --git a/include/nfsc/libnfs.h b/include/nfsc/libnfs.h index d3ce1aa..2149b8a 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; }; /* @@ -308,6 +312,7 @@ EXTERN int nfs_stat64(struct nfs_context *nfs, const char *path, struct nfs_stat * -errno : An error occured. * data is the error string. */ +/* This function is deprecated. Use nfs_fstat64_async() instead */ EXTERN int nfs_fstat_async(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_cb cb, void *private_data); /* * Sync fstat(nfsfh *) @@ -321,6 +326,35 @@ EXTERN int nfs_fstat(struct nfs_context *nfs, struct nfsfh *nfsfh, struct __stat EXTERN int nfs_fstat(struct nfs_context *nfs, struct nfsfh *nfsfh, struct stat *st); #endif +/* nfs_fstat64 + * 64 bit version of fstat. All fields are always 64bit. + * Use these functions instead of nfs_fstat[_async](), especially if you + * have weird stat structures. + */ +/* + * FSTAT() + */ +/* + * Async fstat(nfsfh *) + * 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 struct stat * + * -errno : An error occured. + * data is the error string. + */ +EXTERN int nfs_fstat64_async(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_cb cb, void *private_data); +/* + * Sync fstat(nfsfh *) + * Function returns + * 0 : The operation was successfull. + * -errno : The command failed. + */ +EXTERN int nfs_fstat64(struct nfs_context *nfs, struct nfsfh *nfsfh, struct nfs_stat_64 *st); + /* @@ -815,6 +849,14 @@ struct nfsdirent { 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