blob: 3651bbb4df0b697905d8b24a377bf153cd555675 [file] [log] [blame]
bigbiff bigbiffe60683a2013-02-22 20:55:50 -05001#ifndef BLKID_PARTITIONS_H
2#define BLKID_PARTITIONS_H
3
4#include "blkidP.h"
bigbiff7b4c7a62015-01-01 19:44:14 -05005#include "pt-mbr.h"
bigbiff bigbiffe60683a2013-02-22 20:55:50 -05006
7extern int blkid_partitions_get_flags(blkid_probe pr);
8
9extern blkid_parttable blkid_partlist_new_parttable(blkid_partlist ls,
10 const char *type, blkid_loff_t offset);
11
bigbiff7b4c7a62015-01-01 19:44:14 -050012extern int blkid_parttable_set_uuid(blkid_parttable tab, const unsigned char *id);
bigbiff bigbiffe60683a2013-02-22 20:55:50 -050013extern int blkid_parttable_set_id(blkid_parttable tab, const unsigned char *id);
14
15extern blkid_partition blkid_partlist_add_partition(blkid_partlist ls,
16 blkid_parttable tab,
17 blkid_loff_t start, blkid_loff_t size);
18
19extern int blkid_partlist_set_partno(blkid_partlist ls, int partno);
20extern int blkid_partlist_increment_partno(blkid_partlist ls);
21
22extern blkid_partition blkid_partlist_get_parent(blkid_partlist ls);
23
24extern int blkid_partitions_do_subprobe(blkid_probe pr,
25 blkid_partition parent, const struct blkid_idinfo *id);
26
27extern int blkid_partitions_need_typeonly(blkid_probe pr);
bigbiff7b4c7a62015-01-01 19:44:14 -050028extern int blkid_partitions_set_ptuuid(blkid_probe pr, unsigned char *uuid);
29extern int blkid_partitions_strcpy_ptuuid(blkid_probe pr, char *str);
30
31
bigbiff bigbiffe60683a2013-02-22 20:55:50 -050032extern int blkid_is_nested_dimension(blkid_partition par,
33 blkid_loff_t start, blkid_loff_t size);
34
35extern int blkid_partition_set_name(blkid_partition par,
36 const unsigned char *name, size_t len);
37
38extern int blkid_partition_set_utf8name(blkid_partition par,
39 const unsigned char *name, size_t len, int enc);
40
41extern int blkid_partition_set_uuid(blkid_partition par,
42 const unsigned char *uuid);
bigbiff7b4c7a62015-01-01 19:44:14 -050043extern int blkid_partition_gen_uuid(blkid_partition par);
bigbiff bigbiffe60683a2013-02-22 20:55:50 -050044
45extern int blkid_partition_set_type(blkid_partition par, int type);
46
47extern int blkid_partition_set_type_string(blkid_partition par,
48 const unsigned char *type, size_t len);
49
50extern int blkid_partition_set_type_uuid(blkid_partition par,
51 const unsigned char *uuid);
52
53extern int blkid_partition_set_flags(blkid_partition par, unsigned long long flags);
54
55/*
56 * partition probers
57 */
58extern const struct blkid_idinfo aix_pt_idinfo;
59extern const struct blkid_idinfo bsd_pt_idinfo;
60extern const struct blkid_idinfo unixware_pt_idinfo;
61extern const struct blkid_idinfo solaris_x86_pt_idinfo;
62extern const struct blkid_idinfo sun_pt_idinfo;
63extern const struct blkid_idinfo sgi_pt_idinfo;
64extern const struct blkid_idinfo mac_pt_idinfo;
65extern const struct blkid_idinfo dos_pt_idinfo;
66extern const struct blkid_idinfo minix_pt_idinfo;
67extern const struct blkid_idinfo gpt_pt_idinfo;
bigbiff7b4c7a62015-01-01 19:44:14 -050068extern const struct blkid_idinfo pmbr_pt_idinfo;
bigbiff bigbiffe60683a2013-02-22 20:55:50 -050069extern const struct blkid_idinfo ultrix_pt_idinfo;
70
71#endif /* BLKID_PARTITIONS_H */