Changeset 84239b1 in mainline for uspace/app


Ignore:
Timestamp:
2018-03-11T19:39:11Z (8 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f3d47c97
Parents:
850fd32
Message:

And there was much fixing.

Location:
uspace/app
Files:
6 edited

Legend:

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

    r850fd32 r84239b1  
    680680        unsigned r;
    681681
    682         for (r = 0;n >> r != 1; ++r);
     682        r = 0;
     683        while (n >> r != 1)
     684                ++r;
    683685
    684686        return r;
     
    771773        cfg.label = NULL;
    772774
    773         for (c = 0, optind = 0, opt_ind = 0; c != -1;) {
     775        c = 0;
     776        optind = 0;
     777        opt_ind = 0;
     778        while (c != -1) {
    774779                c = getopt_long(argc, argv, "hs:c:L:",
    775780                    long_options, &opt_ind);
     
    845850
    846851        if (cfg.sector_size > 4096) {
    847                 printf(NAME ": Error, sector size can't be greater" \
     852                printf(NAME ": Error, sector size can't be greater"
    848853                    " than 4096 bytes.\n");
    849854                return 2;
     
    852857        rc = block_get_nblocks(service_id, &cfg.volume_count);
    853858        if (rc != EOK) {
    854                 printf(NAME ": Warning, failed to obtain" \
     859                printf(NAME ": Warning, failed to obtain"
    855860                    " block device size.\n");
    856861
    857862                if (user_fs_size == 0) {
    858                         printf(NAME ": You must specify the" \
     863                        printf(NAME ": You must specify the"
    859864                            " filesystem size.\n");
    860865                        return 1;
     
    897902            div_round_up(cfg.bitmap_size, cfg.cluster_size));
    898903        if (rc != EOK) {
    899                 printf(NAME ": Error, failed to allocate" \
     904                printf(NAME ": Error, failed to allocate"
    900905                    " clusters for bitmap.\n");
    901906                return 2;
     
    910915            div_round_up(sizeof(upcase_table), cfg.cluster_size));
    911916        if (rc != EOK) {
    912                 printf(NAME ":Error, failed to allocate clusters" \
     917                printf(NAME ":Error, failed to allocate clusters"
    913918                    " for the upcase table.\n");
    914919                return 2;
     
    921926        rc = fat_allocate_clusters(service_id, &cfg, next_cls, 1);
    922927        if (rc != EOK) {
    923                 printf(NAME ": Error, failed to allocate cluster" \
     928                printf(NAME ": Error, failed to allocate cluster"
    924929                    " for the root dentry.\n");
    925930                return 2;
     
    931936        rc = bitmap_write(service_id, &cfg);
    932937        if (rc != EOK) {
    933                 printf(NAME ": Error, failed to write the allocation" \
     938                printf(NAME ": Error, failed to write the allocation"
    934939                    " bitmap to disk.\n");
    935940                return 2;
     
    941946        rc = upcase_table_write(service_id, &cfg);
    942947        if (rc != EOK) {
    943                 printf(NAME ": Error, failed to write the" \
     948                printf(NAME ": Error, failed to write the"
    944949                    " upcase table to disk.\n");
    945950                return 2;
     
    950955        rc = root_dentries_write(service_id, &cfg);
    951956        if (rc != EOK) {
    952                 printf(NAME ": Error, failed to write the root directory" \
     957                printf(NAME ": Error, failed to write the root directory"
    953958                    " entries to disk.\n");
    954959                return 2;
  • uspace/app/mkfat/fat.h

    r850fd32 r84239b1  
    117117                        /** Signature. */
    118118                        uint16_t        signature;
    119                 } fat32 __attribute__ ((packed));
     119                } __attribute__ ((packed)) fat32;
    120120        };
    121121} __attribute__ ((packed)) fat_bs_t;
  • uspace/app/mkmfs/mkmfs.c

    r850fd32 r84239b1  
    133133        }
    134134
    135         for (c = 0, optind = 0, opt_ind = 0; c != -1;) {
     135        c = 0;
     136        optind = 0;
     137        opt_ind = 0;
     138        while (c != -1) {
    136139                c = getopt_long(argc, argv, "lh12b:i:",
    137140                    long_options, &opt_ind);
     
    566569        errno_t rc;
    567570
    568         sb = malloc(MFS_SUPERBLOCK_SIZE);;
     571        sb = malloc(MFS_SUPERBLOCK_SIZE);
    569572
    570573        if (!sb)
  • uspace/app/tester/chardev/chardev1.c

    r850fd32 r84239b1  
    210210                return s;
    211211
    212         return test_chardev1_partialx();;
    213 }
     212        return test_chardev1_partialx();
     213}
  • uspace/app/tetris/tetris.c

    r850fd32 r84239b1  
    116116                base = i * B_COLS + 1;
    117117                p = &board[base];
    118                 for (j = B_COLS - 2; *p++ != 0;) {
     118                j = B_COLS - 2;
     119                while (*p++ != 0) {
    119120                        if (--j <= 0) {
    120121                                /* This row is to be elided */
  • uspace/app/tmon/tests.c

    r850fd32 r84239b1  
    8181        int c;
    8282        uint32_t duration_uint;
    83         for (c = 0, optreset = 1, optind = 0; c != -1;) {
     83        c = 0;
     84        optreset = 1;
     85        optind = 0;
     86        while (c != -1) {
    8487                c = getopt_long(argc, argv, short_options, long_options, NULL);
    8588                switch (c) {
Note: See TracChangeset for help on using the changeset viewer.