mixin: Remove some mixin leftovers

Some manifest functions used by mixin were left behind

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
This commit is contained in:
Otavio Pontes
2020-05-07 13:22:28 -07:00
parent fc1f874c89
commit 3870dc5181
2 changed files with 0 additions and 40 deletions
-39
View File
@@ -983,45 +983,6 @@ void manifest_free_array(struct file **array)
FREE(array);
}
static bool is_version_data(const char *filename)
{
if (str_cmp(filename, "/usr/lib/os-release") == 0 ||
str_cmp(filename, "/usr/share/clear/version") == 0 ||
str_cmp(filename, "/usr/share/clear/versionstamp") == 0 ||
str_cmp(filename, DEFAULT_VERSION_URL_PATH) == 0 ||
str_cmp(filename, DEFAULT_CONTENT_URL_PATH) == 0 ||
str_cmp(filename, DEFAULT_FORMAT_PATH) == 0 ||
str_cmp(filename, "/usr/share/clear/update-ca/Swupd_Root.pem") == 0 ||
str_cmp(filename, "/usr/share/clear/os-core-update-index") == 0 ||
str_cmp(filename, "/usr/share/clear/allbundles/os-core") == 0) {
return true;
}
return false;
}
int enforce_compliant_manifest(struct file **a, struct file **b, int searchsize, int size)
{
struct file **found;
int ret = 0;
qsort(b, size, sizeof(struct file *), cmp_file_filename_ptr);
info("Checking manifest uniqueness...\n");
for (int i = 0; i < searchsize; i++) {
found = bsearch(a[i], b, size, sizeof(struct file *), bsearch_file_helper);
if (found) {
if (is_version_data(a[i]->filename)) {
continue;
}
if (hash_equal(a[i]->hash, (*found)->hash)) {
continue;
}
error("Conflict found for file: %s\n", a[i]->filename);
ret++;
}
}
return ret; // If collisions were found, so manifest is purely additive
}
long get_manifest_list_contentsize(struct list *manifests)
{
long total_size = 0;
-1
View File
@@ -381,7 +381,6 @@ enum swupd_code third_party_execute_check_update(void);
enum swupd_code third_party_execute_update(void);
extern struct file **manifest_files_to_array(struct manifest *manifest);
extern int enforce_compliant_manifest(struct file **a, struct file **b, int searchsize, int size);
extern void manifest_free_array(struct file **array);
extern enum swupd_code print_update_conf_info(void);