Changeset 30440ed in mainline for uspace/lib/mbr/libmbr.h
- Timestamp:
- 2013-04-08T23:15:42Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 256cbfe
- Parents:
- 271e24a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/mbr/libmbr.h
r271e24a r30440ed 39 39 40 40 #define LIBMBR_NAME "libmbr" 41 42 #ifdef DEBUG_CONFIG 43 #include <stdio.h> 44 #include <str_error.h> 45 #define DEBUG_PRINT_0(str) \ 46 printf("%s:%d: " str, __FILE__, __LINE__) 47 #define DEBUG_PRINT_1(str, arg1) \ 48 printf("%s:%d: " str, __FILE__, __LINE__, arg1) 49 #define DEBUG_PRINT_2(str, arg1, arg2) \ 50 printf("%s:%d: " str, __FILE__, __LINE__, arg1, arg2) 51 #define DEBUG_PRINT_3(str, arg1, arg2, arg3) \ 52 printf("%s:%d: " str, __FILE__, __LINE__, arg1, arg2, arg3) 53 #else 54 #define DEBUG_PRINT_0(str) 55 #define DEBUG_PRINT_1(str, arg1) 56 #define DEBUG_PRINT_2(str, arg1, arg2) 57 #define DEBUG_PRINT_3(str, arg1, arg2, arg3) 58 #endif 41 59 42 60 /** Number of primary partition records */ … … 105 123 /** Device where the data are from */ 106 124 service_id_t device; 107 /** Pointer to partition list */108 //list of partitions; //if we keep this in here, we should free() it in mbr_free_mbr()109 125 } mbr_t; 110 126 111 127 112 //FIXME: make mbr_partitions_t as the linked list for keeping the same interface as with GPT113 128 /** Partition */ 114 129 typedef struct mbr_part { … … 127 142 } mbr_part_t; 128 143 144 /** Partition list structure */ 129 145 typedef struct mbr_parts { 130 146 /** Number of primary partitions */ … … 138 154 } mbr_partitions_t; 139 155 156 /** Both header and partition list */ 140 157 typedef struct mbr_table { 141 158 mbr_t * mbr; … … 151 168 extern int mbr_is_mbr(mbr_t * mbr); 152 169 153 /** Read/Write/Set MBR partitions. */ 170 /** Read/Write/Set MBR partitions. 171 * NOTE: Writing partitions writes the complete header as well. */ 154 172 extern mbr_partitions_t * mbr_read_partitions(mbr_t * mbr); 155 173 extern int mbr_write_partitions(mbr_partitions_t * parts, mbr_t * mbr, service_id_t dev_handle);
Note:
See TracChangeset
for help on using the changeset viewer.