From 50044efbd6e713e86f705a60eddab0c034dffeba Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 12 Nov 2015 10:31:27 +0100 Subject: mkfs.ubifs: Add extended attribute support This adds extended attribute support to mkfs.ubifs. When creating an image from a directory tree the existing extended attributes are added to the UBIFS image. Signed-off-by: Sascha Hauer Signed-off-by: Marc Kleine-Budde Signed-off-by: Richard Weinberger --- ubifs-utils/mkfs.ubifs/ubifs.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ubifs-utils/mkfs.ubifs/ubifs.h') 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 { -- cgit v1.2.3