diff -urN uci-12012009.6-ori/list.c uci-12012009.6/list.c
--- uci-12012009.6-ori/list.c	2010-08-14 16:39:58.000000000 +0800
+++ uci-12012009.6/list.c	2010-11-24 10:52:56.000000000 +0800
@@ -717,3 +717,32 @@
 	return 0;
 }
 
+struct uci_option *
+uci_lookup_option(struct uci_list *list, const char *name)
+{
+	struct uci_element *e;
+	struct uci_option *o;
+	uci_foreach_element(list, e) {
+		if (!strcmp(e->name, name))
+		{
+			o=uci_to_option(e);
+			return o;
+		}	
+	}
+	return NULL;
+}
+
+struct uci_section *
+uci_lookup_section(struct uci_list *list, const char *name)
+{
+	struct uci_element *e;
+	struct uci_section *s;
+	uci_foreach_element(list, e) {
+		if (!strcmp(e->name, name))
+		{
+			s=uci_to_section(e);
+			return s;
+		}	
+	}
+	return NULL;
+}
diff -urN uci-12012009.6-ori/uci.h uci-12012009.6/uci.h
--- uci-12012009.6-ori/uci.h	2010-08-14 16:39:58.000000000 +0800
+++ uci-12012009.6/uci.h	2010-11-24 10:52:47.000000000 +0800
@@ -631,3 +631,8 @@
 	(((char *) ptr) + sizeof(*ptr))
 
 #endif
+
+struct uci_option *
+	uci_lookup_option(struct uci_list *list, const char *name);
+struct uci_section *
+	uci_lookup_section(struct uci_list *list, const char *name);
