From df5d5489aed7ae9de007776e19350bd5aebbfea2 Mon Sep 17 00:00:00 2001 From: Zhihao Cheng Date: Mon, 11 Nov 2024 17:08:12 +0800 Subject: ubifs-utils: libubifs: Support some file operations Add some file operations, such as ubifs_lookup, ubifs_mkdir, etc., this is a preparation for recovering disconnected files or root dir in fsck. File writing operations are based on the journal subsystem, generated dirty data depends on a new commit in subsequent steps to update disk content. Signed-off-by: Zhihao Cheng Signed-off-by: David Oberhollenzer --- ubifs-utils/common/linux_types.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ubifs-utils/common') diff --git a/ubifs-utils/common/linux_types.h b/ubifs-utils/common/linux_types.h index 556b2e2..ebf9ecd 100644 --- a/ubifs-utils/common/linux_types.h +++ b/ubifs-utils/common/linux_types.h @@ -28,6 +28,9 @@ struct fscrypt_name { #define fname_name(p) ((p)->disk_name.name) #define fname_len(p) ((p)->disk_name.len) +#define S_IRUGO (S_IRUSR|S_IRGRP|S_IROTH) +#define S_IXUGO (S_IXUSR|S_IXGRP|S_IXOTH) + #define t16(x) ({ \ uint16_t __b = (x); \ (__LITTLE_ENDIAN==__BYTE_ORDER) ? __b : bswap_16(__b); \ -- cgit v1.2.3