hc
2023-11-06 15ade055295d13f95d49e3d99b09f3bbfb4a43e7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* SPDX-License-Identifier: GPL-2.0 */
/*
 *  block/partitions/rk.h
 */
 
/* 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;
};
int rkpart_partition(struct parsed_partitions *state);