From e44eb6beacb1d9519e1bf4a5fdc2203ffcd243f7 Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Wed, 20 Nov 2013 11:28:43 +0100 Subject: tss: Split img3 tag add helpers into common, img3 and img4 --- src/tss.c | 11 ++++++++++- src/tss.h | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/tss.c b/src/tss.c index 5b21887..a6aaf8f 100644 --- a/src/tss.c +++ b/src/tss.c @@ -232,7 +232,7 @@ int tss_request_add_baseband_tags(plist_t request, plist_t parameters) { return 0; } -int tss_request_add_ap_tags_from_manifest(plist_t request, plist_t build_identity, plist_t overrides) { +int tss_request_add_common_tags_from_manifest(plist_t request, plist_t build_identity, plist_t overrides) { plist_t node = NULL; char* string = NULL; @@ -291,6 +291,15 @@ int tss_request_add_ap_tags_from_manifest(plist_t request, plist_t build_identit string = NULL; node = NULL; + /* apply overrides */ + if (overrides) { + plist_dict_merge(&request, overrides); + } + + return 0; +} + +int tss_request_add_ap_tags_from_manifest(plist_t request, plist_t build_identity, plist_t overrides) { /* loop over components from build manifest */ plist_t manifest_node = plist_dict_get_item(build_identity, "Manifest"); if (!manifest_node || plist_get_node_type(manifest_node) != PLIST_DICT) { diff --git a/src/tss.h b/src/tss.h index f468707..b1d300a 100644 --- a/src/tss.h +++ b/src/tss.h @@ -33,6 +33,7 @@ extern "C" { /* request */ plist_t tss_request_new(plist_t overrides); +int tss_request_add_common_tags_from_manifest(plist_t request, plist_t build_identity, plist_t overrides); int tss_request_add_ap_tags_from_manifest(plist_t request, plist_t build_identity, plist_t overrides); int tss_request_add_baseband_tags_from_manifest(plist_t request, plist_t build_identity, plist_t overrides); -- cgit v1.1-32-gdbae