Changes in uspace/lib/gpt/libgpt.h [c3cbbb2:dc76f4a] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/gpt/libgpt.h
rc3cbbb2 rdc76f4a 34 34 */ 35 35 36 #ifndef __GPT_H__37 #define __GPT_H__36 #ifndef LIBGPT_LIBGPT_H_ 37 #define LIBGPT_LIBGPT_H_ 38 38 39 39 #define LIBGPT_NAME "libgpt" … … 41 41 #include <loc.h> 42 42 #include <sys/types.h> 43 44 #include "gpt.h" 43 45 44 46 /** Block address of GPT header. */ … … 59 61 extern const uint8_t efi_signature[8]; 60 62 61 typedef enum {62 AT_REQ_PART = 0,63 AT_NO_BLOCK_IO,64 AT_LEGACY_BOOT,65 AT_UNDEFINED,66 AT_SPECIFIC = 4867 } GPT_ATTR;68 69 /** GPT header70 * - all in little endian.71 */72 typedef struct {73 uint8_t efi_signature[8];74 uint32_t revision;75 uint32_t header_size;76 uint32_t header_crc32;77 uint32_t reserved;78 uint64_t my_lba;79 uint64_t alternate_lba;80 uint64_t first_usable_lba;81 uint64_t last_usable_lba;82 uint8_t disk_guid[16];83 uint64_t entry_lba;84 uint32_t fillries;85 uint32_t entry_size;86 uint32_t pe_array_crc32;87 } __attribute__((packed)) gpt_header_t;88 89 63 typedef struct { 90 64 /** Raw header. Has more bytes alloced than sizeof(gpt_header_t)! … … 93 67 } gpt_t; 94 68 95 /** GPT partition entry */96 typedef struct {97 uint8_t part_type[16];98 uint8_t part_id[16];99 uint64_t start_lba;100 uint64_t end_lba;101 uint64_t attributes;102 uint8_t part_name[72];103 } __attribute__((packed)) gpt_entry_t;104 105 106 //typedef struct g_part {107 ///** Partition entry is in use **/108 //bool present;109 ///** Address of first block */110 //aoff64_t start_addr;111 ///** Number of blocks */112 //aoff64_t length;113 ///** Raw data access */114 //gpt_entry_t raw_data; //TODO: a pointer or just a member?115 //}gpt_part_t;116 69 typedef gpt_entry_t gpt_part_t; 117 118 70 119 71 typedef struct gpt_parts { … … 168 120 169 121 extern void gpt_set_random_uuid(uint8_t *); 122 extern uint64_t gpt_get_next_aligned(uint64_t, unsigned int); 170 123 171 124
Note:
See TracChangeset
for help on using the changeset viewer.