/* * Copyright (c) 2023, Artinchip Technology Co., Ltd * * SPDX-License-Identifier: Apache-2.0 * * Mingfeng.Li * Dehuang Wu */ #include #include #include #include #include #define MAX_PARTITION_NAME 64 struct aic_partition { char name[MAX_PARTITION_NAME]; u32 start; u32 size; struct aic_partition *next; }; struct aic_partition *aic_part_mtd_parse(char *parts); struct aic_partition *aic_part_gpt_parse(char *parts); struct aic_partition *aic_part_get_byname(struct aic_partition *head, char *name); void aic_part_free(struct aic_partition *head); void aic_part_dump(struct aic_partition *head);