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