add option to disallow module loading after startup

git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@177 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2004-09-03 22:44:55 +00:00
parent 4a9239f808
commit fb962b67db
8 changed files with 34 additions and 10 deletions

View file

@ -72,6 +72,7 @@ void pa_cmdline_help(const char *argv0) {
" -C Open a command line on the running TTY\n"
" -n Don't load configuration file (%s)\n"
" -D Daemonize after loading the modules\n"
" -d Disallow module loading after startup\n"
" -f Dont quit when the startup fails\n"
" -v Verbose startup\n"
" -h Show this help\n"
@ -88,13 +89,19 @@ struct pa_cmdline* pa_cmdline_parse(int argc, char * const argv []) {
assert(argc && argv);
cmdline = pa_xmalloc(sizeof(struct pa_cmdline));
cmdline->daemonize = cmdline->help = cmdline->verbose = cmdline->high_priority = cmdline->stay_root = cmdline->version = 0;
cmdline->daemonize =
cmdline->help =
cmdline->verbose =
cmdline->high_priority =
cmdline->stay_root =
cmdline->version =
cmdline->disallow_module_loading = 0;
cmdline->fail = 1;
buf = pa_strbuf_new();
assert(buf);
while ((c = getopt(argc, argv, "L:F:CDhfvrRVn")) != -1) {
while ((c = getopt(argc, argv, "L:F:CDhfvrRVnd")) != -1) {
switch (c) {
case 'L':
pa_strbuf_printf(buf, "load %s\n", optarg);
@ -127,9 +134,11 @@ struct pa_cmdline* pa_cmdline_parse(int argc, char * const argv []) {
cmdline->version = 1;
break;
case 'n':
no_default_config_file =1;
no_default_config_file = 1;
break;
case 'd':
cmdline->disallow_module_loading = 1;
break;
default:
goto fail;
}