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