aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorvapier <vapier@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-07-05 02:19:20 +0000
committervapier <vapier@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-07-05 02:19:20 +0000
commit8c1554a4253be66272bafad8859af703d5e32c7d (patch)
tree85d41530da514dff4dcd08260fdf35b0d2b7a434 /init
parent588ccf6fe501bb65545b92e1b7ff6ec72f08bcfa (diff)
downloadbusybox-w32-8c1554a4253be66272bafad8859af703d5e32c7d.tar.gz
busybox-w32-8c1554a4253be66272bafad8859af703d5e32c7d.tar.bz2
busybox-w32-8c1554a4253be66272bafad8859af703d5e32c7d.zip
rename log var to log_console so we dont override internal gcc/glibc log func
git-svn-id: svn://busybox.net/trunk/busybox@10716 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'init')
-rw-r--r--init/init.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/init/init.c b/init/init.c
index 850851173..e0e2f19fb 100644
--- a/init/init.c
+++ b/init/init.c
@@ -156,7 +156,7 @@ static struct init_action *init_action_list = NULL;
156static char console[CONSOLE_BUFF_SIZE] = _PATH_CONSOLE; 156static char console[CONSOLE_BUFF_SIZE] = _PATH_CONSOLE;
157 157
158#ifndef CONFIG_SYSLOGD 158#ifndef CONFIG_SYSLOGD
159static char *log = VC_5; 159static char *log_console = VC_5;
160#endif 160#endif
161static sig_atomic_t got_cont = 0; 161static sig_atomic_t got_cont = 0;
162static const int LOG = 0x1; 162static const int LOG = 0x1;
@@ -239,9 +239,9 @@ static void message(int device, const char *fmt, ...)
239 /* Take full control of the log tty, and never close it. 239 /* Take full control of the log tty, and never close it.
240 * It's mine, all mine! Muhahahaha! */ 240 * It's mine, all mine! Muhahahaha! */
241 if (log_fd < 0) { 241 if (log_fd < 0) {
242 if ((log_fd = device_open(log, O_RDWR | O_NDELAY | O_NOCTTY)) < 0) { 242 if ((log_fd = device_open(log_console, O_RDWR | O_NDELAY | O_NOCTTY)) < 0) {
243 log_fd = -2; 243 log_fd = -2;
244 bb_error_msg("Bummer, can't write to log on %s!", log); 244 bb_error_msg("Bummer, can't write to log on %s!", log_console);
245 device = CONSOLE; 245 device = CONSOLE;
246 } else { 246 } else {
247 fcntl(log_fd, F_SETFD, FD_CLOEXEC); 247 fcntl(log_fd, F_SETFD, FD_CLOEXEC);
@@ -381,7 +381,7 @@ static void console_init(void)
381 if (fd < 0) { 381 if (fd < 0) {
382 /* Perhaps we should panic here? */ 382 /* Perhaps we should panic here? */
383#ifndef CONFIG_SYSLOGD 383#ifndef CONFIG_SYSLOGD
384 log = 384 log_console =
385#endif 385#endif
386 safe_strncpy(console, "/dev/null", sizeof(console)); 386 safe_strncpy(console, "/dev/null", sizeof(console));
387 } else { 387 } else {
@@ -393,7 +393,7 @@ static void console_init(void)
393 if (s == NULL || strcmp(s, "linux") == 0) 393 if (s == NULL || strcmp(s, "linux") == 0)
394 putenv("TERM=vt102"); 394 putenv("TERM=vt102");
395#ifndef CONFIG_SYSLOGD 395#ifndef CONFIG_SYSLOGD
396 log = console; 396 log_console = console;
397#endif 397#endif
398 } else { 398 } else {
399 if (s == NULL) 399 if (s == NULL)