]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/util.h
Update bcachefs sources to 1a739db0b256 bcachefs; guard against overflow in btree...
[bcachefs-tools-debian] / libbcachefs / util.h
index b93d5f481c7eee48b3418dfa83ab9f0ab7b53cf0..a4db93a2a8ec8f93ae5114d5e5a7a6c85870a385 100644 (file)
@@ -855,4 +855,11 @@ static inline int cmp_le32(__le32 l, __le32 r)
 
 #include <linux/uuid.h>
 
+#define QSTR(n) { { { .len = strlen(n) } }, .name = n }
+
+static inline bool qstr_eq(const struct qstr l, const struct qstr r)
+{
+       return l.len == r.len && !memcmp(l.name, r.name, l.len);
+}
+
 #endif /* _BCACHEFS_UTIL_H */