shithub: lwext4

Download patch

ref: 2248320547a804425ffb56c073b8a4058b72b3c0
parent: 3dc5c1d1af3d714c606888ca0e40ab5a601cf6cd
author: ngkaho1234 <[email protected]>
date: Sun Oct 4 18:32:29 EDT 2015

ext4_xattr_lookup_item added.

--- a/lwext4/ext4_xattr.c
+++ b/lwext4/ext4_xattr.c
@@ -307,13 +307,19 @@
 	return ret;
 }
 
-static void
-ext4_xattr_lookup_items(struct ext4_xattr_ref *xattr_ref,
-			uint8_t name_index,
-			char   *name,
-			size_t  name_len)
+static struct ext4_xattr_item *
+ext4_xattr_lookup_item(struct ext4_xattr_ref *xattr_ref,
+		       uint8_t name_index,
+		       char   *name,
+		       size_t  name_len)
 {
-
+	struct ext4_xattr_item tmp, *ret;
+	tmp.name_index = name_index;
+	tmp.name       = name;
+	tmp.name_len   = name_len;
+	ret = RB_FIND(ext4_xattr_tree, &xattr_ref->root,
+			&tmp);
+	return ret;
 }
 
 static void