[syslinux:elflink] xfs: Add xfs_fmt_btree_find_entry()

syslinux-bot for Chen Baozi baozich at gmail.com
Tue Nov 27 12:57:23 PST 2012


Commit-ID:  7807be97f3df9f039592908140b97c12e3f30ede
Gitweb:     http://www.syslinux.org/commit/7807be97f3df9f039592908140b97c12e3f30ede
Author:     Chen Baozi <baozich at gmail.com>
AuthorDate: Wed, 15 Aug 2012 17:32:39 +0800
Committer:  Paulo Alcantara <pcacjr at zytor.com>
CommitDate: Sun, 2 Sep 2012 19:10:28 -0300

xfs: Add xfs_fmt_btree_find_entry()

Add the basic framework to handle B+Tree directory.

Signed-off-by: Chen Baozi <baozich at gmail.com>
Signed-off-by: Paulo Alcantara <pcacjr at zytor.com>

---
 core/fs/xfs/xfs.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/core/fs/xfs/xfs.c b/core/fs/xfs/xfs.c
index 69a5716..fe7e46a 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 "


More information about the Syslinux-commits mailing list