From: Pawel Wieczorkiewicz Date: Wed, 21 Aug 2019 08:20:43 +0000 (+0000) Subject: create-diff-object: Add is_special_section() helper function X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=6e13a7237db5c8d379482d9f6bd4cbf951f966f3;p=livepatch-build-tools.git create-diff-object: Add is_special_section() helper function This function determines, based on the given section name, if the sections belongs to the special sections category. Signed-off-by: Pawel Wieczorkiewicz Reviewed-by: Andra-Irina Paraschiv Reviewed-by: Bjoern Doebel Reviewed-by: Norbert Manthey Reviewed-by: Ross Lagerwall Signed-off-by: Ross Lagerwall --- diff --git a/create-diff-object.c b/create-diff-object.c index 4699ba0..0df3fea 100644 --- a/create-diff-object.c +++ b/create-diff-object.c @@ -1045,6 +1045,18 @@ static struct special_section special_sections[] = { {}, }; +static int is_special_section(const struct section *sec) +{ + struct special_section *special; + + for (special = special_sections; special->name; special++) { + if (!strcmp(sec->name, special->name)) + return true; + } + + return false; +} + static int should_keep_rela_group(struct section *sec, int start, int size) { struct rela *rela;