diff options
author | Patrick Steinhardt <ps@pks.im> | 2017-07-02 15:42:51 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-07-04 17:15:32 +0200 |
commit | 6a3bcf340aa9d7defc86f21d75fd9412c5b9f427 (patch) | |
tree | ef070f39c9d47dd7abae691b74d6da25b3de97c8 /procps/free.c | |
parent | d253b557a338c5fe27e8f5e55540db07e7842fc4 (diff) | |
download | busybox-6a3bcf340aa9d7defc86f21d75fd9412c5b9f427.tar.gz |
setpriv: prepare option parsing logic for additional opts
The current option parsing logic of setpriv only supports the case where
we want to execute a sub-program and have at most one argument. Refactor
handling of options to solve these shortcomings to make it easy to
support 'setpriv --dump', which does not accept any additional
arguments, as well as the case where additional options are passed to
setpriv. This is done by handling 'argc' ourselves, throwing an error
when no program is specified, as well as introducing an enum for the
different option bitmasks.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'procps/free.c')
0 files changed, 0 insertions, 0 deletions