Changes in uspace/lib/gpt/libgpt.h [dc76f4a:c3cbbb2] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/gpt/libgpt.h
rdc76f4a rc3cbbb2 34 34 */ 35 35 36 #ifndef LIBGPT_LIBGPT_H_37 #define LIBGPT_LIBGPT_H_36 #ifndef __GPT_H__ 37 #define __GPT_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"45 43 46 44 /** Block address of GPT header. */ … … 61 59 extern const uint8_t efi_signature[8]; 62 60 61 typedef enum { 62 AT_REQ_PART = 0, 63 AT_NO_BLOCK_IO, 64 AT_LEGACY_BOOT, 65 AT_UNDEFINED, 66 AT_SPECIFIC = 48 67 } GPT_ATTR; 68 69 /** GPT header 70 * - 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 63 89 typedef struct { 64 90 /** Raw header. Has more bytes alloced than sizeof(gpt_header_t)! … … 67 93 } gpt_t; 68 94 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; 69 116 typedef gpt_entry_t gpt_part_t; 117 70 118 71 119 typedef struct gpt_parts { … … 120 168 121 169 extern void gpt_set_random_uuid(uint8_t *); 122 extern uint64_t gpt_get_next_aligned(uint64_t, unsigned int);123 170 124 171
Note:
See TracChangeset
for help on using the changeset viewer.