summaryrefslogtreecommitdiff
path: root/ubifs-utils/mkfs.ubifs/ubifs.h
diff options
context:
space:
mode:
Diffstat (limited to 'ubifs-utils/mkfs.ubifs/ubifs.h')
-rw-r--r--ubifs-utils/mkfs.ubifs/ubifs.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/ubifs-utils/mkfs.ubifs/ubifs.h b/ubifs-utils/mkfs.ubifs/ubifs.h
index 434b651..2f080a8 100644
--- a/ubifs-utils/mkfs.ubifs/ubifs.h
+++ b/ubifs-utils/mkfs.ubifs/ubifs.h
@@ -42,6 +42,15 @@
*/
#define UBIFS_TRUN_KEY UBIFS_KEY_TYPES_CNT
+/*
+ * How much a directory entry/extended attribute entry adds to the parent/host
+ * inode.
+ */
+#define CALC_DENT_SIZE(name_len) ALIGN(UBIFS_DENT_NODE_SZ + (name_len) + 1, 8)
+
+/* How much an extended attribute adds to the host inode */
+#define CALC_XATTR_BYTES(data_len) ALIGN(UBIFS_INO_NODE_SZ + (data_len) + 1, 8)
+
/* The below union makes it easier to deal with keys */
union ubifs_key
{