Whamcloud - gitweb
mke2fs: fix the parsing used for -E quotatype=usrquota:grpquota:prjquota
authorTheodore Ts'o <tytso@mit.edu>
Mon, 9 May 2016 01:11:18 +0000 (21:11 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 9 May 2016 01:25:55 +0000 (21:25 -0400)
commita195e862cae6e96895b702efa52a38458dc4b42b
tree9d248f60597d95c8f715f826e607a87514811c96
parent1973233e530fbe49694cc26d5c351e7a11470fa2
mke2fs: fix the parsing used for -E quotatype=usrquota:grpquota:prjquota

Commit 2d2d799c7261 tried to use parse_quota_options(), which uses
commas to separate out the quota types.  Unfortunately, when parsing
extended options, commands are used to separate different extended
options.

To fix this, I've add a new support function parse_quota_type(), which
allows either commas or colons to used as a separator character, and
which manipulates a bit field to indicate which quota types should be
enabled.  Eventually tune2fs should be converted to use
parse_quota_type() as well, thus obsoleting parse_quota_options(), but
that's a more complicated cleanup patch for later.

Fix a lint warning which could the number of blocks to be incorretly
printed if it exceeds 2**32.

Also fix some typos and other minor bugs in the usage message.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/support/Makefile.in
lib/support/Makefile.in.old [new file with mode: 0644]
lib/support/parse_qtype.c [new file with mode: 0644]
lib/support/quotaio.h
misc/mke2fs.c