diff options
author | Hugo Mills <hugo@carfax.org.uk> | 2015-01-27 15:05:52 +0000 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2015-01-27 16:41:06 +0100 |
commit | 7c126f7afc33d0aca7fc3053c7f1348df6feb8c8 (patch) | |
tree | e7e1a3007b6ae34612e4e2fe051289903c3ddee0 /Documentation/btrfs-qgroup.txt | |
parent | 1c93eb00891ecd2d012cec6bb5f592bae3566599 (diff) |
btrfs-progs: Make option parsing more robust to code modifications
The current approach to option parsing, where long-only options are
selected on the basis of their position in the long_options array is
fragile and painful to modify if options are to be inserted into the
list, rather than appended.
Instead, use the last field of struct option to return a value which
cannot be a char (and hence a short option), and simply switch on those
within the case statement.
Signed-off-by: Hugo Mills <hugo@carfax.org.uk>
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'Documentation/btrfs-qgroup.txt')
0 files changed, 0 insertions, 0 deletions