summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorHugo Mills <hugo@carfax.org.uk>2015-01-27 15:05:52 +0000
committerDavid Sterba <dsterba@suse.cz>2015-01-27 16:41:06 +0100
commit7c126f7afc33d0aca7fc3053c7f1348df6feb8c8 (patch)
treee7e1a3007b6ae34612e4e2fe051289903c3ddee0 /Documentation
parent1c93eb00891ecd2d012cec6bb5f592bae3566599 (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')
0 files changed, 0 insertions, 0 deletions