Changeset 332513a in mainline


Ignore:
Timestamp:
2013-09-11T22:13:05Z (11 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e88f3e9
Parents:
e1ec5a2
Message:

cstyle

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/df/df.c

    re1ec5a2 r332513a  
    5050#define HEADER_TABLE_HR "Filesystem           Size           Used      Available Used%% Mounted on"
    5151
    52 #define PERCENTAGE(x, tot) ((unsigned long long) (100L * (x) / (tot))) 
     52#define PERCENTAGE(x, tot) ((unsigned long long) (100L * (x) / (tot)))
    5353#define FSBK_TO_BK(x, fsbk, bk) \
    5454        (((fsbk) != 0 && (fsbk) < (bk)) ? \
     
    6868        int optres, errflg = 0;
    6969        struct statfs st;
    70        
     70
    7171        unit_size = 512;
    7272        human_readable = 0;
     
    8888                        str_uint32_t(optarg, NULL, 0, 0, &unit_size);
    8989                        break;
    90     
    91                 case ':':       
     90 
     91                case ':':
    9292                        fprintf(stderr, "Option -%c requires an operand\n", optopt);
    9393                        errflg++;
     
    110110                errflg++;
    111111        }
    112        
     112
    113113        if (errflg) {
    114114                print_usage();
    115115                return 1;
    116116        }
    117        
     117
    118118        LIST_INITIALIZE(mtab_list);
    119119        get_mtab_list(&mtab_list);
     
    123123                print_statfs(&st, mtab_ent->fs_name, mtab_ent->mp);
    124124        }
    125         putchar('\n'); 
     125        putchar('\n');
    126126        return 0;
    127127}
     
    148148{
    149149        if (human_readable)
    150                 printf(HEADER_TABLE_HR); 
    151         else 
     150                printf(HEADER_TABLE_HR);
     151        else
    152152                printf(HEADER_TABLE, unit_size);
    153153        putchar('\n');
     
    157157{
    158158        printf("%10s", name);
    159        
     159
    160160        if (human_readable) {
    161161                char tmp[1024];
     
    179179                        mountpoint                                                                     /* Mounted on */
    180180                );
    181        
     181
    182182}
    183183
    184184static void print_usage(void)
    185185{
    186   printf("syntax: %s [-u] [-h] [-b <size>] \n", NAME);
    187   printf("  u : Show usage.\n"); 
    188   printf("  h : \"Human-readable\" output.\n"); 
    189   printf("  b : Scale block sizes by selected size.\n"); 
    190   printf("\n");
     186        printf("syntax: %s [-u] [-h] [-b <size>] \n", NAME);
     187        printf("  u : Show usage.\n");
     188        printf("  h : \"Human-readable\" output.\n");
     189        printf("  b : Scale block sizes by selected size.\n");
     190        printf("\n");
    191191}
    192192
Note: See TracChangeset for help on using the changeset viewer.