Changeset 1433ecda in mainline for uspace/app/mkfat


Ignore:
Timestamp:
2018-04-04T15:42:37Z (8 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2c4e1cc
Parents:
47b2d7e3
Message:

Fix cstyle: make ccheck-fix and commit only files where all the changes are good.

Location:
uspace/app/mkfat
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/mkfat/fat.h

    r47b2d7e3 r1433ecda  
    8686                        /** Boot sector signature. */
    8787                        uint16_t        signature;
    88                 } __attribute__ ((packed));
     88                } __attribute__((packed));
    8989                struct {
    9090                        /* FAT32 only */
     
    117117                        /** Signature. */
    118118                        uint16_t        signature;
    119                 } __attribute__ ((packed)) fat32;
     119                } __attribute__((packed)) fat32;
    120120        };
    121 } __attribute__ ((packed)) fat_bs_t;
     121} __attribute__((packed)) fat_bs_t;
    122122
    123123#endif
  • uspace/app/mkfat/fat_dentry.h

    r47b2d7e3 r1433ecda  
    116116                        uint16_t        eaidx;          /* FAT12/FAT16 */
    117117                        uint16_t        firstc_hi;      /* FAT32 */
    118                 } __attribute__ ((packed));
     118                } __attribute__((packed));
    119119                uint16_t        mtime;
    120120                uint16_t        mdate;
     
    122122                        uint16_t        firstc;         /* FAT12/FAT16 */
    123123                        uint16_t        firstc_lo;      /* FAT32 */
    124                 } __attribute__ ((packed));
     124                } __attribute__((packed));
    125125                uint32_t        size;
    126         } __attribute__ ((packed));
     126        } __attribute__((packed));
    127127        struct {
    128128                uint8_t         order;
     
    134134                uint16_t        firstc_lo; /* MUST be 0 */
    135135                uint16_t        part3[FAT_LFN_PART3_SIZE];
    136         } __attribute__ ((packed)) lfn;
    137 } __attribute__ ((packed)) fat_dentry_t;
     136        } __attribute__((packed)) lfn;
     137} __attribute__((packed)) fat_dentry_t;
    138138
    139139#endif
  • uspace/app/mkfat/mkfat.c

    r47b2d7e3 r1433ecda  
    116116        }
    117117
    118         --argc; ++argv;
     118        --argc;
     119        ++argv;
    119120
    120121        while (*argv[0] == '-') {
    121122                if (str_cmp(*argv, "--size") == 0) {
    122                         --argc; ++argv;
     123                        --argc;
     124                        ++argv;
    123125                        if (*argv == NULL) {
    124126                                printf(NAME ": Error, argument missing.\n");
     
    134136                        }
    135137
    136                         --argc; ++argv;
     138                        --argc;
     139                        ++argv;
    137140                }
    138141
    139142                if (str_cmp(*argv, "--type") == 0) {
    140                         --argc; ++argv;
     143                        --argc;
     144                        ++argv;
    141145                        if (*argv == NULL) {
    142146                                printf(NAME ": Error, argument missing.\n");
     
    152156                        }
    153157
    154                         --argc; ++argv;
     158                        --argc;
     159                        ++argv;
    155160                }
    156161
    157162                if (str_cmp(*argv, "--label") == 0) {
    158                         --argc; ++argv;
     163                        --argc;
     164                        ++argv;
    159165                        if (*argv == NULL) {
    160166                                printf(NAME ": Error, argument missing.\n");
     
    165171                        cfg.label = *argv;
    166172
    167                         --argc; ++argv;
     173                        --argc;
     174                        ++argv;
    168175                }
    169176
    170177                if (str_cmp(*argv, "-") == 0) {
    171                         --argc; ++argv;
     178                        --argc;
     179                        ++argv;
    172180                        break;
    173181                }
     
    268276                if (dp != NULL)
    269277                        dp[i] = toupper(*sp);
    270                 ++i; ++sp;
     278                ++i;
     279                ++sp;
    271280        }
    272281
     
    305314        /* Only correct for FAT12/16 (FAT32 has root dir stored in clusters */
    306315        rd_sectors = div_round_up(cfg->root_ent_max * DIRENT_SIZE,
    307                 cfg->sector_size);
     316            cfg->sector_size);
    308317        non_data_sectors_lb_16 = cfg->reserved_sectors + rd_sectors;
    309318
     
    333342        if (cfg->fat_type != FAT32) {
    334343                cfg->rootdir_sectors = div_round_up(cfg->root_ent_max * DIRENT_SIZE,
    335                         cfg->sector_size);
     344                    cfg->sector_size);
    336345                non_data_sectors_lb = cfg->reserved_sectors + cfg->rootdir_sectors;
    337346
Note: See TracChangeset for help on using the changeset viewer.