Changeset 3621 in MondoRescue for branches/3.3/mindi-busybox/sysklogd/klogd.c
- Timestamp:
- Dec 20, 2016, 4:07:32 PM (7 years ago)
- Location:
- branches/3.3
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3/mindi-busybox/sysklogd/klogd.c
r3232 r3621 17 17 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 18 18 */ 19 //config:config KLOGD 20 //config: bool "klogd" 21 //config: default y 22 //config: help 23 //config: klogd is a utility which intercepts and logs all 24 //config: messages from the Linux kernel and sends the messages 25 //config: out to the 'syslogd' utility so they can be logged. If 26 //config: you wish to record the messages produced by the kernel, 27 //config: you should enable this option. 28 //config: 29 //config:comment "klogd should not be used together with syslog to kernel printk buffer" 30 //config: depends on KLOGD && FEATURE_KMSG_SYSLOG 31 //config: 32 //config:config FEATURE_KLOGD_KLOGCTL 33 //config: bool "Use the klogctl() interface" 34 //config: default y 35 //config: depends on KLOGD 36 //config: select PLATFORM_LINUX 37 //config: help 38 //config: The klogd applet supports two interfaces for reading 39 //config: kernel messages. Linux provides the klogctl() interface 40 //config: which allows reading messages from the kernel ring buffer 41 //config: independently from the file system. 42 //config: 43 //config: If you answer 'N' here, klogd will use the more portable 44 //config: approach of reading them from /proc or a device node. 45 //config: However, this method requires the file to be available. 46 //config: 47 //config: If in doubt, say 'Y'. 48 49 //applet:IF_KLOGD(APPLET(klogd, BB_DIR_SBIN, BB_SUID_DROP)) 50 51 //kbuild:lib-$(CONFIG_KLOGD) += klogd.o 19 52 20 53 //usage:#define klogd_trivial_usage … … 26 59 27 60 #include "libbb.h" 61 #include "common_bufsiz.h" 28 62 #include <syslog.h> 29 63 … … 66 100 #else 67 101 68 # include <paths.h>69 102 # ifndef _PATH_KLOG 70 103 # ifdef __GNU__ … … 116 149 #define log_buffer bb_common_bufsiz1 117 150 enum { 118 KLOGD_LOGBUF_SIZE = sizeof(log_buffer),151 KLOGD_LOGBUF_SIZE = COMMON_BUFSIZE, 119 152 OPT_LEVEL = (1 << 0), 120 153 OPT_FOREGROUND = (1 << 1), … … 141 174 int opt; 142 175 int used; 176 177 setup_common_bufsiz(); 143 178 144 179 opt = getopt32(argv, "c:n", &opt_c);
Note:
See TracChangeset
for help on using the changeset viewer.