Changeset 30440ed in mainline for uspace/app/hdisk/func_mbr.c
- Timestamp:
- 2013-04-08T23:15:42Z (12 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/app/hdisk/func_mbr.c
r271e24a r30440ed 35 35 #include <stdio.h> 36 36 #include <errno.h> 37 #include <str_error.h> 37 38 #include <sys/types.h> 38 39 … … 94 95 printf(" "); 95 96 96 printf("\t \t%u\t%u\t%u\t%d\n", it->start_addr, it->start_addr + it->length, it->length, it->type);97 printf("\t%10u %10u %10u %3d\n", it->start_addr, it->start_addr + it->length, it->length, it->type); 97 98 98 99 ++num; … … 108 109 int rc = mbr_write_partitions(data->mbr.parts, data->mbr.mbr, dev_handle); 109 110 if (rc != EOK) { 110 printf("Error occured during writing . (ERR: %d)\n", rc);111 printf("Error occured during writing: ERR: %d: %s\n", rc, str_error(rc)); 111 112 } 112 113 … … 114 115 } 115 116 116 117 int extra_mbr_funcs(tinput_t * in, service_id_t dev_handle, union table_data * data) 118 { 119 return EOK; 120 } 117 121 118 122 static int set_mbr_partition(tinput_t * in, mbr_part_t * p) … … 123 127 printf("Primary (p) or logical (l): "); 124 128 c = getchar(); 129 printf("%c\n", c); 125 130 126 131 switch(c) { 127 132 case 'p': 128 133 mbr_set_flag(p, ST_LOGIC, false); 134 break; 129 135 case 'l': 130 136 mbr_set_flag(p, ST_LOGIC, true); 137 break; 131 138 default: 132 139 printf("Invalid type. Cancelled."); … … 144 151 return EINVAL; 145 152 } 146 153 printf("%c\n", c); 147 154 mbr_set_flag(p, ST_BOOT, (c == 'y' || c == 'Y') ? true : false); 148 155
Note:
See TracChangeset
for help on using the changeset viewer.