Changeset 30440ed in mainline for uspace/app/hdisk/func_mbr.c


Ignore:
Timestamp:
2013-04-08T23:15:42Z (12 years ago)
Author:
Dominik Taborsky (AT DOT) <brembyseznamcz>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
256cbfe
Parents:
271e24a
Message:

save progress

File:
1 edited

Legend:

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

    r271e24a r30440ed  
    3535#include <stdio.h>
    3636#include <errno.h>
     37#include <str_error.h>
    3738#include <sys/types.h>
    3839
     
    9495                        printf(" ");
    9596
    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);
    9798
    9899                ++num;
     
    108109        int rc = mbr_write_partitions(data->mbr.parts, data->mbr.mbr, dev_handle);
    109110        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));
    111112        }
    112113       
     
    114115}
    115116
    116 
     117int extra_mbr_funcs(tinput_t * in, service_id_t dev_handle, union table_data * data)
     118{
     119        return EOK;
     120}
    117121
    118122static int set_mbr_partition(tinput_t * in, mbr_part_t * p)
     
    123127        printf("Primary (p) or logical (l): ");
    124128        c = getchar();
     129        printf("%c\n", c);
    125130
    126131        switch(c) {
    127132                case 'p':
    128133                        mbr_set_flag(p, ST_LOGIC, false);
     134                        break;
    129135                case 'l':
    130136                        mbr_set_flag(p, ST_LOGIC, true);
     137                        break;
    131138                default:
    132139                        printf("Invalid type. Cancelled.");
     
    144151                return EINVAL;
    145152        }
    146        
     153        printf("%c\n", c);
    147154        mbr_set_flag(p, ST_BOOT, (c == 'y' || c == 'Y') ? true : false);
    148155
Note: See TracChangeset for help on using the changeset viewer.