Changeset 3621 in MondoRescue for branches/3.3/mindi-busybox/runit/svlogd.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/runit/svlogd.c
r3232 r3621 27 27 28 28 /* Busyboxed by Denys Vlasenko <vda.linux@googlemail.com> */ 29 /* TODO: depends on runit_lib.c - review and reduce/eliminate */30 29 31 30 /* … … 126 125 */ 127 126 127 //config:config SVLOGD 128 //config: bool "svlogd" 129 //config: default y 130 //config: help 131 //config: svlogd continuously reads log data from its standard input, optionally 132 //config: filters log messages, and writes the data to one or more automatically 133 //config: rotated logs. 134 135 //applet:IF_SVLOGD(APPLET(svlogd, BB_DIR_USR_SBIN, BB_SUID_DROP)) 136 137 //kbuild:lib-$(CONFIG_SVLOGD) += svlogd.o 138 128 139 //usage:#define svlogd_trivial_usage 129 140 //usage: "[-ttv] [-r C] [-R CHARS] [-l MATCHLEN] [-b BUFLEN] DIR..." … … 143 154 //usage: "\n""E,ePATTERN - (de)select line for stderr" 144 155 145 #include <sys/poll.h>146 156 #include <sys/file.h> 147 157 #include "libbb.h" 158 #include "common_bufsiz.h" 148 159 #include "runit_lib.h" 149 160 … … 224 235 #define fl_flag_0 (G.fl_flag_0 ) 225 236 #define dirn (G.dirn ) 237 #define line bb_common_bufsiz1 226 238 #define INIT_G() do { \ 239 setup_common_bufsiz(); \ 227 240 SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \ 228 241 linemax = 1000; \ … … 231 244 replace = ""; \ 232 245 } while (0) 233 234 #define line bb_common_bufsiz1235 246 236 247 … … 746 757 break; 747 758 case 's': { 748 static const struct suffix_mult km_suffixes[] = {749 { "k", 1024 },750 { "m", 1024*1024 },751 { "", 0 }752 };753 759 ld->sizemax = xatou_sfx(&s[1], km_suffixes); 754 760 break; … … 1041 1047 if (opt & 2) if (!repl) repl = '_'; // -R 1042 1048 if (opt & 4) { // -l 1043 linemax = xatou_range(l, 0, BUFSIZ-26);1049 linemax = xatou_range(l, 0, COMMON_BUFSIZE-26); 1044 1050 if (linemax == 0) 1045 linemax = BUFSIZ-26;1051 linemax = COMMON_BUFSIZE-26; 1046 1052 if (linemax < 256) 1047 1053 linemax = 256;
Note:
See TracChangeset
for help on using the changeset viewer.