]> git.baikalelectronics.ru Git - kernel.git/commit
kconfig: use getopt() in conf.c for handling command line arguments
authorAndres Salomon <dilinger@debian.org>
Mon, 17 Dec 2007 06:34:58 +0000 (01:34 -0500)
committerSam Ravnborg <sam@ravnborg.org>
Mon, 28 Jan 2008 22:14:36 +0000 (23:14 +0100)
commitf7d6c0fab839004060e52e4aaf841460c65ede00
tree36e0bbe86be28a801e0907c3a17731c4fafbe17b
parentba09dfd14cfe80761e99d03e5ccbb1dbb6ee8ffc
kconfig: use getopt() in conf.c for handling command line arguments

Switch from doing our own parsing of command line arguments to
using getopt(3) to do it.  Aside from simplifying things, this allows us to
specify multiple arguments; the old code could only accept two arguments
(input_mode and kconfig name).

Note some subtle changes:
 - The argument '-?' is no longer supported.
 - '-h' is not treated as an error, so output goes to stdout, and we
   exit with '0'.
 - There is no compatibility checking amongst arguments; the last option
   will simply override earlier options.  For example, 'conf -n -y foo'
   is perfectly valid now (input_mode will be set_yes).  Previously, that
   would have been an error ("can't find file -y").

Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
scripts/kconfig/conf.c