|
| 1 | +/* vim: set et sw=4 ts=4 sts=4 : */ |
1 | 2 | /********************************************************************\
|
2 | 3 | * This program is free software; you can redistribute it and/or *
|
3 | 4 | * modify it under the terms of the GNU General Public License as *
|
|
18 | 19 | * *
|
19 | 20 | \********************************************************************/
|
20 | 21 |
|
21 |
| -/* $Id$ */ |
22 | 22 | /** @file commandline.c
|
23 | 23 | @brief Command line argument handling
|
24 | 24 | @author Copyright (C) 2004 Philippe April <[email protected]>
|
|
33 | 33 | #include "debug.h"
|
34 | 34 | #include "safe.h"
|
35 | 35 | #include "conf.h"
|
| 36 | +#include "commandline.h" |
36 | 37 |
|
37 | 38 | #include "../config.h"
|
38 | 39 |
|
39 | 40 | /*
|
40 | 41 | * Holds an argv that could be passed to exec*() if we restart ourselves
|
41 | 42 | */
|
42 |
| -/* Declare variable */ |
43 |
| -extern char **restartargv; |
44 |
| -/* Define variable */ |
45 |
| -char **restartargv = NULL; |
| 43 | +char ** restartargv = NULL; |
46 | 44 |
|
47 |
| -static void usage(void); |
48 |
| - |
49 |
| -void parse_commandline(int argc, char **argv); |
50 |
| - |
51 |
| -/* |
| 45 | +/** |
52 | 46 | * A flag to denote whether we were restarted via a parent wifidog, or started normally
|
53 | 47 | * 0 means normally, otherwise it will be populated by the PID of the parent
|
54 | 48 | */
|
55 |
| -extern pid_t restart_orig_pid; |
56 | 49 | pid_t restart_orig_pid = 0;
|
57 | 50 |
|
| 51 | +static void usage(void); |
| 52 | + |
58 | 53 | /** @internal
|
59 | 54 | * @brief Print usage
|
60 | 55 | *
|
@@ -97,7 +92,6 @@ parse_commandline(int argc, char **argv)
|
97 | 92 | restartargv[i++] = safe_strdup(argv[0]);
|
98 | 93 |
|
99 | 94 | while (-1 != (c = getopt(argc, argv, "c:hfd:sw:vx:i:"))) {
|
100 |
| - |
101 | 95 | skiponrestart = 0;
|
102 | 96 |
|
103 | 97 | switch (c) {
|
@@ -185,5 +179,4 @@ parse_commandline(int argc, char **argv)
|
185 | 179 | restartargv[i++] = NULL;
|
186 | 180 | restartargv[i++] = NULL;
|
187 | 181 | restartargv[i++] = NULL;
|
188 |
| - |
189 | 182 | }
|
0 commit comments