Changeset 9bda5d90 in mainline for uspace/app/hdisk/func_mbr.c
- Timestamp:
- 2013-05-03T01:20:11Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 469739f, c9f61150, f6c8fca
- Parents:
- 700f89e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/hdisk/func_mbr.c
r700f89e r9bda5d90 68 68 printf("Number of the partition to delete (counted from 0): "); 69 69 idx = get_input_size_t(in); 70 70 71 if (idx == 0 && errno != EOK) 72 return errno; 73 71 74 rc = mbr_remove_partition(data->mbr.parts, idx); 72 75 if(rc != EOK) { … … 81 84 data->mbr.mbr = mbr_alloc_mbr(); 82 85 data->mbr.parts = mbr_alloc_partitions(); 86 return EOK; 83 87 } 84 88 … … 103 107 printf(" "); 104 108 105 printf("\t%10u %10u %10u %7 x\n", it->start_addr, it->start_addr + it->length, it->length, it->type);109 printf("\t%10u %10u %10u %7u\n", it->start_addr, it->start_addr + it->length, it->length, it->type); 106 110 107 111 ++num; … … 109 113 110 114 printf("%d partitions found.\n", num); 111 printf("DEBUG: primary: %hhu, logical: %u\n", data->mbr.parts->n_primary, data->mbr.parts->n_logical);112 115 113 116 return EOK; … … 126 129 int extra_mbr_funcs(tinput_t * in, service_id_t dev_handle, union table_data * data) 127 130 { 131 printf("Not implemented.\n"); 128 132 return EOK; 129 133 } … … 152 156 printf("Set type (0-255): "); 153 157 type = get_input_uint8(in); 158 if (type == 0 && errno != EOK) 159 return errno; 154 160 155 161 ///TODO: there can only be one bootable partition; let's do it just like fdisk … … 168 174 printf("Set starting address (number): "); 169 175 sa = get_input_uint32(in); 176 if (sa == 0 && errno != EOK) 177 return errno; 170 178 171 179 printf("Set end addres (number): "); 172 180 ea = get_input_uint32(in); 181 if (ea == 0 && errno != EOK) 182 return errno; 173 183 174 184 if(ea < sa) {
Note:
See TracChangeset
for help on using the changeset viewer.