diff options
author | Richard Weinberger <richard@nod.at> | 2018-10-18 16:36:54 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2018-11-01 12:39:37 +0100 |
commit | 5b63183c901a2d8c052ac5be44486eb090165a19 (patch) | |
tree | 69ed8c0cf99bbaf37deace615b0a226331ca2a32 /ubifs-utils/mkfs.ubifs/key.h | |
parent | 2144f88af24e03879b4c09fe15c5c982d296b7a3 (diff) |
mkfs.ubifs: Make sure we catch nodes that should or should not have name
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'ubifs-utils/mkfs.ubifs/key.h')
-rw-r--r-- | ubifs-utils/mkfs.ubifs/key.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ubifs-utils/mkfs.ubifs/key.h b/ubifs-utils/mkfs.ubifs/key.h index c18e35e..2de530b 100644 --- a/ubifs-utils/mkfs.ubifs/key.h +++ b/ubifs-utils/mkfs.ubifs/key.h @@ -209,4 +209,14 @@ static inline int keys_cmp(const union ubifs_key *key1, return 0; } +/** + * key_type - get key type. + * @c: UBIFS file-system description object + * @key: key to get type of + */ +static inline int key_type(const union ubifs_key *key) +{ + return key->u32[1] >> UBIFS_S_KEY_BLOCK_BITS; +} + #endif /* !__UBIFS_KEY_H__ */ |