Changeset 3c8b0a8 in mainline for uspace/app


Ignore:
Timestamp:
2018-12-15T15:48:59Z (7 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4bb4cf88
Parents:
b6d5e31 (diff), 6ea5e7a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Maurizio Lombardi <m.lombardi85@…> (2018-12-15 15:48:59)
git-committer:
GitHub <noreply@…> (2018-12-15 15:48:59)
Message:

Merge pull request #143 from maurizio-lombardi/ext4_fixes_v2

Ext4 fixes

File:
1 edited

Legend:

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

    rb6d5e31 r3c8b0a8  
    5656        aoff64_t nblocks;
    5757        const char *label = "";
     58        unsigned int bsize = 1024;
    5859
    5960        cfg.version = ext4_def_fs_version;
     
    7980
    8081                        nblocks = strtol(*argv, &endptr, 10);
     82                        if (*endptr != '\0') {
     83                                printf(NAME ": Error, invalid argument.\n");
     84                                syntax_print();
     85                                return 1;
     86                        }
     87
     88                        --argc;
     89                        ++argv;
     90                        continue;
     91                }
     92
     93                if (str_cmp(*argv, "--bsize") == 0) {
     94                        --argc;
     95                        ++argv;
     96                        if (*argv == NULL) {
     97                                printf(NAME ": Error, argument missing.\n");
     98                                syntax_print();
     99                                return 1;
     100                        }
     101
     102                        bsize = strtol(*argv, &endptr, 10);
    81103                        if (*endptr != '\0') {
    82104                                printf(NAME ": Error, invalid argument.\n");
     
    159181
    160182        cfg.volume_name = label;
     183        cfg.bsize = bsize;
    161184        (void) nblocks;
    162185
     
    178201            "\t--size <sectors> Filesystem size, overrides device size\n"
    179202            "\t--label <label>  Volume label\n"
    180             "\t--type <fstype>  Filesystem type (ext2, ext2old)\n");
     203            "\t--type <fstype>  Filesystem type (ext2, ext2old)\n"
     204            "\t--bsize <bytes>  Filesystem block size in bytes (default = 1024)\n");
    181205}
    182206
Note: See TracChangeset for help on using the changeset viewer.