Changeset 7570e800 in mainline for uspace/lib/gpt/libgpt.h
- Timestamp:
- 2012-12-18T23:05:20Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5beb1ff
- Parents:
- cbd64057
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/gpt/libgpt.h
rcbd64057 r7570e800 36 36 #define __GPT_H__ 37 37 38 #define NAME "libgpt" 39 38 40 #include <sys/types.h> 39 41 … … 52 54 }; 53 55 54 /** GPT header */ 56 /** GPT header 57 * - all in little endian. 58 */ 55 59 typedef struct { 56 60 uint8_t efi_signature[8]; … … 77 81 service_id_t device; 78 82 /** Linked list of partitions (initially NULL) */ 79 //g_part_t * partitions; //shall we keep this? same problem as in libmbr80 //NOTE: if we have partition list here, do we free() it or not?81 83 } gpt_t; 82 84 … … 109 111 /** Resizable partition array */ 110 112 gpt_entry_t * part_array; 111 112 113 } gpt_parts_t; 113 114 … … 115 116 const char * desc; 116 117 const char * guid; 117 } 118 }; 118 119 119 struct partition_type gpt_ptypes[] {120 struct partition_type gpt_ptypes[] = { 120 121 { "Unused entry", "00000000-0000-0000-0000-000000000000" }, 121 122 { "MBR partition scheme", "024DEE41-33E7-11D3-9D69-0008C781F39F" }, … … 184 185 185 186 extern gpt_t * gpt_read_gpt_header(service_id_t dev_handle); 186 extern int gpt_write_gpt_header(gpt_ header_theader, service_id_t dev_handle);187 extern int gpt_write_gpt_header(gpt_t * header, service_id_t dev_handle); 187 188 188 189 extern gpt_parts_t * gpt_read_partitions(gpt_t * gpt); 189 extern int gpt_write_partitions(gpt_parts_t * parts, gpt_t * header); 190 extern gpt_parts_t * gpt_add_partition(gpt_parts_t * parts, g_part_t partition); 191 extern gpt_parts_t * gpt_remove_partition(gpt_parts_t * parts, int idx); 190 extern int gpt_write_partitions(gpt_parts_t * parts, gpt_t * header, service_id_t dev_handle); 191 extern int gpt_add_partition(gpt_parts_t * parts, g_part_t * partition); 192 extern void gpt_remove_partition(gpt_parts_t * parts, int idx); 193 extern void gpt_set_part_type(g_part_t * p, int type); 194 extern void gpt_set_part_name(gpt_entry_t * p, char * name[], size_t length); 192 195 193 196 extern void gpt_free_gpt(gpt_t * gpt);
Note:
See TracChangeset
for help on using the changeset viewer.