summaryrefslogtreecommitdiff
path: root/boot/scene.c
diff options
context:
space:
mode:
Diffstat (limited to 'boot/scene.c')
-rw-r--r--boot/scene.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/boot/scene.c b/boot/scene.c
index 6fbc1fc578c..e52333371f9 100644
--- a/boot/scene.c
+++ b/boot/scene.c
@@ -92,6 +92,18 @@ void *scene_obj_find(struct scene *scn, uint id, enum scene_obj_t type)
return NULL;
}
+void *scene_obj_find_by_name(struct scene *scn, const char *name)
+{
+ struct scene_obj *obj;
+
+ list_for_each_entry(obj, &scn->obj_head, sibling) {
+ if (!strcmp(name, obj->name))
+ return obj;
+ }
+
+ return NULL;
+}
+
int scene_obj_add(struct scene *scn, const char *name, uint id,
enum scene_obj_t type, uint size, struct scene_obj **objp)
{