OSDN Git Service

Replace popt usage with getopt_long in efivar.c.
authorDavid Cantrell <david.l.cantrell@gmail.com>
Tue, 26 Sep 2017 13:50:50 +0000 (09:50 -0400)
committerPeter Jones <pjones@redhat.com>
Tue, 26 Sep 2017 17:04:33 +0000 (13:04 -0400)
commit1aec5e7891557179278d6be29a9e3de0173d40c1
tree2c82e5afaa2dc3feaf5f3981f27c1eee8a629e94
parentbbd2b9849cf6fec338aa7b6745e1c1a666fca42c
Replace popt usage with getopt_long in efivar.c.

efivar does not make use of popt in a way that really requires the
dependency.  Since this is a low level system utility, it's possible
some system builders want to reduce redundant libraries they need to
build and install.  popt is arguably redundant with getopt_long.  It's
possible to just drop long option handling entirely so it works with
plain old getopt.  The intent with this patch was to provide the same
command line options but just using what the C library provides rather
than popt.

The attributes variable in main() has also been changed to a uint32_t
size and sign consistency with its usage in edit_variable().

Signed-off-by: David Cantrell <david.l.cantrell@gmail.com>
src/efivar.c