KernelNanopiR5S-6/block/partitions/rk.h
2024-09-10 15:59:00 +02:00

49 lines
854 B
C

/* SPDX-License-Identifier: GPL-2.0 */
/*
* block/partitions/rk.h
*/
#ifndef FS_PART_RK_H_INCLUDED
#define FS_PART_RK_H_INCLUDED
/* error message prefix */
#define ERRP "rkpart: "
/* debug macro */
#define RKPART_DEBUG 0
#if RKPART_DEBUG
#define dbg(x) \
do { \
printk("DEBUG-CMDLINE-PART: "); \
printk x; \
} while (0)
#else
#define dbg(x)
#endif
/* At least 1GB disk support*/
#define SECTOR_1G 0x200000
/* Default partition table offet got from loader: 4MB*/
#define FROM_OFFSET 0x2000
/* special size referring to all the remaining space in a partition */
#define SIZE_REMAINING UINT_MAX
#define OFFSET_CONTINUOUS UINT_MAX
struct rk_partition {
char *name;
sector_t from;
sector_t size;
};
struct cmdline_rk_partition {
struct cmdline_rk_partition *next;
char *rk_id;
int num_parts;
struct rk_partition *parts;
};
#endif