summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2009-11-08 23:40:13 +0100
committerMichael Adam <obnox@samba.org>2009-11-14 12:13:10 +0100
commita09dd9cd00f0752ff14b326d556073904f095ed7 (patch)
tree12f256be27f3458a4010ea6fc80827ac13ceec79 /src
parent8945d9f0aeff9c850bc13359aa38ac7f9ad78f58 (diff)
main: add a config struct argument to process_cmdline.
Michael
Diffstat (limited to 'src')
-rw-r--r--src/main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c
index 51eb854..3427fc9 100644
--- a/src/main.c
+++ b/src/main.c
@@ -196,7 +196,7 @@ get_id (char *str)
* This function parses command line arguments.
**/
static void
-process_cmdline (int argc, char **argv)
+process_cmdline (int argc, char **argv, struct config_s *conf)
{
int opt;
@@ -211,12 +211,12 @@ process_cmdline (int argc, char **argv)
exit (EX_OK);
case 'd':
- config.godaemon = FALSE;
+ conf->godaemon = FALSE;
break;
case 'c':
- config.config_file = safestrdup (optarg);
- if (!config.config_file) {
+ conf->config_file = safestrdup (optarg);
+ if (!conf->config_file) {
fprintf (stderr,
"%s: Could not allocate memory.\n",
argv[0]);
@@ -325,7 +325,7 @@ main (int argc, char **argv)
umask (0177);
initialize_config_defaults (&config);
- process_cmdline (argc, argv);
+ process_cmdline (argc, argv, &config);
log_message (LOG_INFO, "Initializing " PACKAGE " ...");