aboutsummaryrefslogtreecommitdiff
path: root/ubifs-utils/libubifs/journal.c
diff options
context:
space:
mode:
authorZhihao Cheng <chengzhihao1@huawei.com>2024-11-11 17:01:11 +0800
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2024-11-11 10:32:46 +0100
commite789f23a78be047f0894c4476aa0b6fde369cf7a (patch)
treed02537ed460b9dc87b1588acb9c6ac64107e940c /ubifs-utils/libubifs/journal.c
parent9c55da23863daa51a6e95e5a8e3d6f7c0283797f (diff)
fsck.ubifs: rebuild_fs: Filter invalid files
This is the 4/12 step of rebuilding. Filter out invalid files and drop them, for example: 1. File has no inode node or inode nlink is zero 2. Nonconsistent file type between inode node and dentry nodes 3. File has no dentry nodes(excepts '/') 4. Encrypted file has no xattr information 5. Non regular file has data nodes 6. Directory/xattr file has more than one dentries 7. Xattr file has no host inode, or the host inode is a xattr ... Valid xattr file will be inserted into corresponding host file's subtree. Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com> Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'ubifs-utils/libubifs/journal.c')
-rw-r--r--ubifs-utils/libubifs/journal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ubifs-utils/libubifs/journal.c b/ubifs-utils/libubifs/journal.c
index 37dc3f0..d3fdb76 100644
--- a/ubifs-utils/libubifs/journal.c
+++ b/ubifs-utils/libubifs/journal.c
@@ -404,10 +404,10 @@ static void finish_reservation(struct ubifs_info *c)
}
/**
- * get_dent_type - translate VFS inode mode to UBIFS directory entry type.
+ * ubifs_get_dent_type - translate VFS inode mode to UBIFS directory entry type.
* @mode: inode mode
*/
-static int get_dent_type(int mode)
+int ubifs_get_dent_type(int mode)
{
switch (mode & S_IFMT) {
case S_IFREG: