]>
Commit | Line | Data |
---|---|---|
436d455c | 1 | diff -Nur xc/programs/xfs.org/difs/main.c xc/programs/xfs/difs/main.c |
2 | --- xc/programs/xfs.org/difs/main.c Fri Apr 7 10:14:45 2000 | |
3 | +++ xc/programs/xfs/difs/main.c Fri Apr 7 10:02:01 2000 | |
4 | @@ -56,6 +56,9 @@ | |
5 | #include "dispatch.h" | |
6 | #include "extentst.h" | |
7 | #include "difs.h" | |
8 | + | |
9 | +#include "debug.h" | |
10 | + | |
11 | #include <unistd.h> | |
12 | #include <pwd.h> | |
13 | #include <sys/types.h> | |
14 | @@ -77,6 +80,7 @@ | |
15 | static Bool create_connection_block(void); | |
16 | ||
17 | char *configfilename; | |
18 | +int debug_level; | |
19 | extern Bool drone_server; | |
20 | ||
21 | extern OldListenRec *OldListen; | |
22 | @@ -92,6 +96,7 @@ | |
23 | argvGlobal = argv; | |
24 | droppriv = 0; | |
25 | becomeDaemon = 0; | |
26 | + debug_level = 0; | |
27 | ||
28 | configfilename = DEFAULT_CONFIG_FILE; | |
29 | ||
30 | diff -Nur xc/programs/xfs.org/include/debug.h xc/programs/xfs/include/debug.h | |
31 | --- xc/programs/xfs.org/include/debug.h Thu Jan 1 01:00:00 1970 | |
32 | +++ xc/programs/xfs/include/debug.h Fri Apr 7 10:02:35 2000 | |
33 | @@ -0,0 +1 @@ | |
34 | +/* debug.h */ | |
35 | \ No newline at end of file | |
36 | diff -Nur xc/programs/xfs.org/os/utils.c xc/programs/xfs/os/utils.c | |
37 | --- xc/programs/xfs.org/os/utils.c Fri Apr 7 10:14:45 2000 | |
38 | +++ xc/programs/xfs/os/utils.c Fri Apr 7 10:04:38 2000 | |
39 | @@ -91,6 +91,7 @@ | |
40 | #endif | |
41 | ||
42 | extern char *configfilename; | |
43 | +extern int debug_level; | |
44 | extern int droppriv; /* whether or not to drop root privileges */ | |
45 | extern int becomeDaemon; /* whether to become a daemon or not */ | |
46 | char *progname; | |
47 | @@ -191,7 +192,7 @@ | |
48 | static void | |
49 | usage(void) | |
50 | { | |
51 | - fprintf(stderr, "usage: %s [-config config_file] [-port tcp_port] [-droppriv] [-daemon]\n", | |
52 | + fprintf(stderr, "usage: %s [-config config_file] [-port tcp_port] [-droppriv] [-daemon] [-d debug_level]\n", | |
53 | progname); | |
54 | exit(1); | |
55 | } | |
56 | @@ -295,6 +296,8 @@ | |
57 | ProcessLSoption (argv[++i]); | |
58 | else | |
59 | usage(); | |
60 | + } else if (!strcmp(argv[i], "-d") || !strcmp(argv[i], "--debug")) { | |
61 | + debug_level = atoi(argv[++i]); | |
62 | } else if (!strcmp(argv[i], "-droppriv")) { | |
63 | droppriv = 1; | |
64 | } else if (!strcmp(argv[i], "-daemon")) { |