aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Baozi <baozich@gmail.com>2012-08-15 17:32:39 +0800
committerPaulo Alcantara <pcacjr@zytor.com>2012-09-02 19:10:28 -0300
commit7807be97f3df9f039592908140b97c12e3f30ede (patch)
tree70049ee491b5584a64ced04abbc31247949f05db
parent27c574adbb9d64d94da06174c0c9bb6c88c7a1e2 (diff)
downloadsyslinux-7807be97f3df9f039592908140b97c12e3f30ede.tar.gz
syslinux-7807be97f3df9f039592908140b97c12e3f30ede.tar.xz
syslinux-7807be97f3df9f039592908140b97c12e3f30ede.zip
xfs: Add xfs_fmt_btree_find_entry()
Add the basic framework to handle B+Tree directory. Signed-off-by: Chen Baozi <baozich@gmail.com> Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
-rw-r--r--core/fs/xfs/xfs.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/fs/xfs/xfs.c b/core/fs/xfs/xfs.c
index 69a57166..fe7e46aa 100644
--- a/core/fs/xfs/xfs.c
+++ b/core/fs/xfs/xfs.c
@@ -157,6 +157,13 @@ static inline struct inode *xfs_fmt_extents_find_entry(const char *dname,
return inode;
}
+static inline struct inode *xfs_fmt_btree_find_entry(const char *dname,
+ struct inode *parent,
+ xfs_dinode_t *core)
+{
+ return xfs_dir2_node_find_entry(dname, parent, core);
+}
+
static struct inode *xfs_iget(const char *dname, struct inode *parent)
{
struct fs_info *fs = parent->fs;
@@ -175,6 +182,8 @@ static struct inode *xfs_iget(const char *dname, struct inode *parent)
inode = xfs_fmt_local_find_entry(dname, parent, core);
} else if (core->di_format == XFS_DINODE_FMT_EXTENTS) {
inode = xfs_fmt_extents_find_entry(dname, parent, core);
+ } else if (core->di_format == XFS_DINODE_FMT_BTREE) {
+ inode = xfs_fmt_btree_find_entry(dname, parent, core);
} else {
xfs_debug("format %hhu", core->di_format);
xfs_debug("TODO: format \"local\" and \"extents\" are the only "