diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2015-11-12 10:31:27 +0100 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2015-11-12 10:50:04 +0100 |
commit | 50044efbd6e713e86f705a60eddab0c034dffeba (patch) | |
tree | ab36a5fda13e1bae857a7b1f6b2ab37127a4cdf8 /ubifs-utils/mkfs.ubifs/ubifs.h | |
parent | 978494f76e110154a3035cb1cdbe92965c5552ce (diff) |
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 <s.hauer@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'ubifs-utils/mkfs.ubifs/ubifs.h')
-rw-r--r-- | ubifs-utils/mkfs.ubifs/ubifs.h | 9 |
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 { |