summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2001-03-08 22:11:11 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2001-03-08 22:11:11 +0000
commit0f848ffea92553fc0a477117379025dd920f5fe9 (patch)
treef80e018e77bdf7aab1d8c97ae92eb57a007503a8
parentba20db931254f02dfcc1847975768d0d1f377902 (diff)
downloaddrakx-0f848ffea92553fc0a477117379025dd920f5fe9.tar
drakx-0f848ffea92553fc0a477117379025dd920f5fe9.tar.gz
drakx-0f848ffea92553fc0a477117379025dd920f5fe9.tar.bz2
drakx-0f848ffea92553fc0a477117379025dd920f5fe9.tar.xz
drakx-0f848ffea92553fc0a477117379025dd920f5fe9.zip
workaround kernel-2.4 bug with /dev/log
-rw-r--r--mdk-stage1/init.c49
1 files changed, 25 insertions, 24 deletions
diff --git a/mdk-stage1/init.c b/mdk-stage1/init.c
index 43232b56d..b5f5631f8 100644
--- a/mdk-stage1/init.c
+++ b/mdk-stage1/init.c
@@ -139,30 +139,31 @@ void doklog()
print_warning("couldn't open tty for syslog -- still using /tmp/syslog\n");
/* now open the syslog socket */
- sockaddr.sun_family = AF_UNIX;
- strncpy(sockaddr.sun_path, "/dev/log", UNIX_PATH_MAX);
- sock = socket(AF_UNIX, SOCK_STREAM, 0);
- if (sock < 0) {
- printf("error creating socket: %d\n", errno);
- sleep(5);
- }
-
- print_str_init(log, "] got socket\n");
- if (bind(sock, (struct sockaddr *) &sockaddr, sizeof(sockaddr.sun_family) + strlen(sockaddr.sun_path))) {
- print_str_init(log, "] bind error: ");
- print_int_init(log, errno);
- print_str_init(log, "\n");
- sleep(5);
- }
-
- print_str_init(log, "] bound socket\n");
- chmod("/dev/log", 0666);
- if (listen(sock, 5)) {
- print_str_init(log, "] listen error: ");
- print_int_init(log, errno);
- print_str_init(log, "\n");
- sleep(5);
- }
+// ############# LINUX 2.4 /dev/log IS BUGGED! --> apparently the syslogs can't reach me, and it's full up after a while
+// sockaddr.sun_family = AF_UNIX;
+// strncpy(sockaddr.sun_path, "/dev/log", UNIX_PATH_MAX);
+// sock = socket(AF_UNIX, SOCK_STREAM, 0);
+// if (sock < 0) {
+// printf("error creating socket: %d\n", errno);
+// sleep(5);
+// }
+//
+// print_str_init(log, "] got socket\n");
+// if (bind(sock, (struct sockaddr *) &sockaddr, sizeof(sockaddr.sun_family) + strlen(sockaddr.sun_path))) {
+// print_str_init(log, "] bind error: ");
+// print_int_init(log, errno);
+// print_str_init(log, "\n");
+// sleep(5);
+// }
+//
+// print_str_init(log, "] bound socket\n");
+// chmod("/dev/log", 0666);
+// if (listen(sock, 5)) {
+// print_str_init(log, "] listen error: ");
+// print_int_init(log, errno);
+// print_str_init(log, "\n");
+// sleep(5);
+// }
/* disable on-console syslog output */
syslog(8, NULL, 1);