Changeset 0435fe41 in mainline for uspace/app/hdisk/func_mbr.c
- Timestamp:
- 2013-08-27T00:32:08Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 61ab4a9, 802898f
- Parents:
- 493b881
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/hdisk/func_mbr.c
r493b881 r0435fe41 88 88 89 89 rc = mbr_remove_partition(this->data.mbr, idx); 90 if (rc != EOK) {90 if (rc != EOK) { 91 91 printf("Error: something.\n"); 92 92 } … … 116 116 117 117 printf("Current partition scheme (MBR):\n"); 118 //printf("\t\tBootable:\tStart:\tEnd:\tLength:\tType:\n");119 118 printf("\t\t%10s %10s %10s %10s %7s\n", "Bootable:", "Start:", "End:", "Length:", "Type:"); 120 119 121 120 mbr_part_t *it; 122 //mbr_part_foreach(data->mbr, it) {123 121 124 122 for (it = mbr_get_first_partition(this->data.mbr); it != NULL; … … 135 133 printf("\t%10u %10u %10u %7u\n", it->start_addr, it->start_addr + it->length, it->length, it->type); 136 134 137 //++num;138 135 } 139 136 … … 185 182 printf("%c\n", c); 186 183 187 switch (c) {188 189 190 191 192 193 194 195 196 184 switch (c) { 185 case 'p': 186 mbr_set_flag(p, ST_LOGIC, false); 187 break; 188 case 'l': 189 mbr_set_flag(p, ST_LOGIC, true); 190 break; 191 default: 192 printf("Invalid type. Cancelled.\n"); 193 return EINVAL; 197 194 } 198 195 … … 232 229 return errno; 233 230 234 /* Align ending address, not in use */ 235 /*if (alignment != 0 && alignment != 1) { 236 ea = mbr_get_next_aligned(ea, alignment) - alignment; 237 printf("Starting address was aligned to %u.\n", ea); 238 }*/ 239 240 if(ea < sa) { 231 if (ea < sa) { 241 232 printf("Invalid value. Canceled.\n"); 242 233 return EINVAL;
Note:
See TracChangeset
for help on using the changeset viewer.