mirror of
https://github.com/versity/scoutfs.git
synced 2026-09-18 22:14:15 +00:00
scoutfs: add scoutfs_key_is_zeros()
Add a little function for testing if a given scoutfs key is all zeros. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -80,6 +80,13 @@ static inline void scoutfs_key_set_zeros(struct scoutfs_key *key)
|
||||
key->_sk_fourth = 0;
|
||||
}
|
||||
|
||||
static inline bool scoutfs_key_is_zeros(struct scoutfs_key *key)
|
||||
{
|
||||
return key->sk_zone == 0 && key->_sk_first == 0 && key->sk_type == 0 &&
|
||||
key->_sk_second == 0 && key->_sk_third == 0 &&
|
||||
key->_sk_fourth == 0;
|
||||
}
|
||||
|
||||
static inline void scoutfs_key_copy_or_zeros(struct scoutfs_key *dst,
|
||||
struct scoutfs_key *src)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user