Changeset 0435fe41 in mainline for uspace/app/hdisk/func_mbr.c


Ignore:
Timestamp:
2013-08-27T00:32:08Z (11 years ago)
Author:
Dominik Taborsky (AT DOT) <brembyseznamcz>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
61ab4a9, 802898f
Parents:
493b881
Message:

polishing libmbr, libgpt, hdisk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/hdisk/func_mbr.c

    r493b881 r0435fe41  
    8888       
    8989        rc = mbr_remove_partition(this->data.mbr, idx);
    90         if(rc != EOK) {
     90        if (rc != EOK) {
    9191                printf("Error: something.\n");
    9292        }
     
    116116       
    117117        printf("Current partition scheme (MBR):\n");
    118         //printf("\t\tBootable:\tStart:\tEnd:\tLength:\tType:\n");
    119118        printf("\t\t%10s  %10s %10s %10s %7s\n", "Bootable:", "Start:", "End:", "Length:", "Type:");
    120119       
    121120        mbr_part_t *it;
    122         //mbr_part_foreach(data->mbr, it) {
    123121       
    124122        for (it = mbr_get_first_partition(this->data.mbr); it != NULL;
     
    135133                printf("\t%10u %10u %10u %7u\n", it->start_addr, it->start_addr + it->length, it->length, it->type);
    136134               
    137                 //++num;
    138135        }
    139136       
     
    185182        printf("%c\n", c);
    186183
    187         switch(c) {
    188                 case 'p':
    189                         mbr_set_flag(p, ST_LOGIC, false);
    190                         break;
    191                 case 'l':
    192                         mbr_set_flag(p, ST_LOGIC, true);
    193                         break;
    194                 default:
    195                         printf("Invalid type. Cancelled.\n");
    196                         return EINVAL;
     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;
    197194        }
    198195       
     
    232229                return errno;
    233230       
    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) {
    241232                printf("Invalid value. Canceled.\n");
    242233                return EINVAL;
Note: See TracChangeset for help on using the changeset viewer.