diff options
author | Sami Kerola | 2014-05-17 19:52:01 +0200 |
---|---|---|
committer | Sami Kerola | 2014-05-19 22:58:01 +0200 |
commit | 45c90b77e6aa67b86043734c294652be5aa9f8f7 (patch) | |
tree | ffde49a91a9d52d948d6258e13d4bc83c4c56757 /bash-completion/setterm | |
parent | setterm: clean up includes (diff) | |
download | kernel-qcow2-util-linux-45c90b77e6aa67b86043734c294652be5aa9f8f7.tar.gz kernel-qcow2-util-linux-45c90b77e6aa67b86043734c294652be5aa9f8f7.tar.xz kernel-qcow2-util-linux-45c90b77e6aa67b86043734c294652be5aa9f8f7.zip |
setterm: use getopt_long_only() for option parsing
The getopt_long_only() has advantage of allowing one and two hyphen
versions of options, for example -help and --help. Secondly the getopt
function family from libc can ensure some options requiring arguments,
while other are optional, and some should not accept argument at all.
That makes option parsing more robust.
Unfortunately retiring the old option parsing makes this change greater
than preferred. Assuming not mistakes happen the new code works
functionally exactly as the old did.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'bash-completion/setterm')
0 files changed, 0 insertions, 0 deletions