Changeset b4b3cb05 in mainline for uspace/app/mkexfat/mkexfat.c


Ignore:
Timestamp:
2012-02-29T21:31:04Z (12 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
875bc8b
Parents:
8efc4c1
Message:

mkexfat: specify the fs size in sectors, not in bytes.

File:
1 edited

Legend:

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

    r8efc4c1 rb4b3cb05  
    133133        printf("Usage: mkexfat [options] <device>\n"
    134134            "-c, --cluster-size ## Specify the cluster size (Kb)\n"
    135             "-s, --fs-size ##      Specify the filesystem size (byte)\n");
     135            "-s, --fs-size ##      Specify the filesystem size (sectors)\n");
    136136}
    137137
     
    761761                case 's':
    762762                        user_fs_size = (aoff64_t) strtol(optarg, NULL, 10);
    763                         if (user_fs_size < 1024 * 1024) {
    764                                 printf(NAME ": Error, fs size can't be less"
    765                                     " than 1 Mb.\n");
    766                                 return 1;
    767                         }
    768763                        break;
    769764
     
    812807        }
    813808
     809        user_fs_size *= cfg.sector_size;
     810        if (user_fs_size < 1024 * 1024) {
     811                printf(NAME ": Error, fs size can't be less"
     812                    " than 1 Mb.\n");
     813                return 1;
     814        }
     815
     816
    814817        if (cfg.sector_size > 4096) {
    815818                printf(NAME ": Error, sector size can't be greater" \
Note: See TracChangeset for help on using the changeset viewer.