diff options
author | ShyamsundarR <srangana@redhat.com> | 2018-11-21 09:43:23 -0500 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2019-01-07 14:43:27 +0000 |
commit | c31f1c232a6673c4e3fc3188e15ae0e708a54613 (patch) | |
tree | 195a5c281b7d88991fb9bdc3c4570fec6ca95366 /libglusterfs/src | |
parent | f99f51ca87fd8703947df985901cbce37bc6c818 (diff) |
gfapi: new api glfs_statx as linux's statx
Change-Id: I44dd6ceef0954ae7fc13f920e84d81bbd3f6a774
Updates: #389
Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
Signed-off-by: ShyamsundarR <srangana@redhat.com>
Diffstat (limited to 'libglusterfs/src')
-rw-r--r-- | libglusterfs/src/glusterfs/iatt.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/libglusterfs/src/glusterfs/iatt.h b/libglusterfs/src/glusterfs/iatt.h index 339c84ccc45..bee7a0afa77 100644 --- a/libglusterfs/src/glusterfs/iatt.h +++ b/libglusterfs/src/glusterfs/iatt.h @@ -264,12 +264,10 @@ st_mode_prot_from_ia(ia_prot_t prot) return prot_bit; } -static inline mode_t -st_mode_from_ia(ia_prot_t prot, ia_type_t type) +static inline uint32_t +st_mode_type_from_ia(ia_type_t type) { - mode_t st_mode = 0; uint32_t type_bit = 0; - uint32_t prot_bit = 0; switch (type) { case IA_IFREG: @@ -297,6 +295,17 @@ st_mode_from_ia(ia_prot_t prot, ia_type_t type) break; } + return type_bit; +} + +static inline mode_t +st_mode_from_ia(ia_prot_t prot, ia_type_t type) +{ + mode_t st_mode = 0; + uint32_t type_bit = 0; + uint32_t prot_bit = 0; + + type_bit = st_mode_type_from_ia(type); prot_bit = st_mode_prot_from_ia(prot); st_mode = (type_bit | prot_bit); |