• Adrian Reber's avatar
    config: move getopt out of main() · 139d2dbf
    Adrian Reber authored
    This moves the whole getopt setup and analysis out of main() into its
    own function in config.c.
    
    The main motivation for this change is to be able to call getopt parsing
    and configuration file parsing also from the RPC code path.
    
    In one of the discussion emails about configuration files in CLI and RPC
    mode the following architecture was proposed:
    
    apply_config(global_conf)
    apply_config(user_conf)
    apply_config(pre_conf)
    parse_command_line()
    apply_rpc_options()
    apply_config(post_conf)
    
    And especially for the last step the getopt parsing needs to be out of
    main() and callable from the RPC code path.
    Signed-off-by: 's avatarAdrian Reber <areber@redhat.com>
    Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
    139d2dbf
Name
Last commit
Last update
Documentation Loading commit data...
compel Loading commit data...
contrib Loading commit data...
coredump Loading commit data...
crit Loading commit data...
criu Loading commit data...
images Loading commit data...
include/common Loading commit data...
lib Loading commit data...
scripts Loading commit data...
soccr Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
INSTALL.md Loading commit data...
Makefile Loading commit data...
Makefile.compel Loading commit data...
Makefile.config Loading commit data...
Makefile.install Loading commit data...
Makefile.versions Loading commit data...
README.md Loading commit data...