• A
    kconfig: use getopt() in conf.c for handling command line arguments · 2f4b489b
    Andres Salomon 提交于
    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: NAndres Salomon <dilinger@debian.org>
    Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
    Cc: Roman Zippel <zippel@linux-m68k.org>
    2f4b489b
conf.c 11.7 KB