Files
qdl/patch.h
Bjorn Andersson ce175f2e27 Introduce a linked list abstraction
For some reason qdl was written with open-coded linked list operations
throughout the implementation, resulting in ugly boiler plate code
sprinkled over the code base.

Integrate the linked list abstraction used in a few other of our
open-source projects to clean up the code.

Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
2025-09-12 10:36:09 -05:00

27 lines
540 B
C

/* SPDX-License-Identifier: BSD-3-Clause */
#ifndef __PATCH_H__
#define __PATCH_H__
#include "list.h"
struct qdl_device;
struct patch {
unsigned int sector_size;
unsigned int byte_offset;
const char *filename;
unsigned int partition;
unsigned int size_in_bytes;
const char *start_sector;
const char *value;
const char *what;
struct list_head node;
};
int patch_load(const char *patch_file);
int patch_execute(struct qdl_device *qdl, int (*apply)(struct qdl_device *qdl, struct patch *patch));
void free_patches(void);
#endif