mirror of
https://github.com/linux-msm/qdl.git
synced 2026-02-25 13:12:25 -08:00
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>
29 lines
648 B
C
29 lines
648 B
C
/* SPDX-License-Identifier: BSD-3-Clause */
|
|
#ifndef __READ_H__
|
|
#define __READ_H__
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include "list.h"
|
|
|
|
struct qdl_device;
|
|
|
|
struct read_op {
|
|
unsigned int sector_size;
|
|
const char *filename;
|
|
int partition;
|
|
unsigned int num_sectors;
|
|
const char *start_sector;
|
|
const char *gpt_partition;
|
|
|
|
struct list_head node;
|
|
};
|
|
|
|
int read_op_load(const char *read_op_file, const char *incdir);
|
|
int read_op_execute(struct qdl_device *qdl,
|
|
int (*apply)(struct qdl_device *qdl, struct read_op *read_op, int fd));
|
|
int read_cmd_add(const char *source, const char *filename);
|
|
int read_resolve_gpt_deferrals(struct qdl_device *qdl);
|
|
|
|
#endif
|