2025-06-24 06:49:51 +02:00
|
|
|
/* SPDX-License-Identifier: BSD-3-Clause */
|
2024-01-19 16:24:09 -07:00
|
|
|
#ifndef __READ_H__
|
|
|
|
|
#define __READ_H__
|
|
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
|
2025-08-28 11:26:11 -05:00
|
|
|
#include "list.h"
|
|
|
|
|
|
2024-01-19 16:24:09 -07:00
|
|
|
struct qdl_device;
|
|
|
|
|
|
|
|
|
|
struct read_op {
|
2025-06-18 09:39:54 +02:00
|
|
|
unsigned int sector_size;
|
2024-01-19 16:24:09 -07:00
|
|
|
const char *filename;
|
2025-09-07 21:18:14 -05:00
|
|
|
int partition;
|
2025-06-18 09:39:54 +02:00
|
|
|
unsigned int num_sectors;
|
2024-01-19 16:24:09 -07:00
|
|
|
const char *start_sector;
|
2025-09-07 21:18:14 -05:00
|
|
|
const char *gpt_partition;
|
2025-08-28 11:26:11 -05:00
|
|
|
|
|
|
|
|
struct list_head node;
|
2024-01-19 16:24:09 -07:00
|
|
|
};
|
|
|
|
|
|
2025-08-28 14:36:10 -05:00
|
|
|
int read_op_load(const char *read_op_file, const char *incdir);
|
2024-01-19 16:24:09 -07:00
|
|
|
int read_op_execute(struct qdl_device *qdl,
|
2025-08-28 14:36:10 -05:00
|
|
|
int (*apply)(struct qdl_device *qdl, struct read_op *read_op, int fd));
|
2025-09-07 20:56:44 -05:00
|
|
|
int read_cmd_add(const char *source, const char *filename);
|
2025-09-07 21:18:14 -05:00
|
|
|
int read_resolve_gpt_deferrals(struct qdl_device *qdl);
|
2024-01-19 16:24:09 -07:00
|
|
|
|
|
|
|
|
#endif
|