Changeset 3621 in MondoRescue for branches/3.3/mindi-busybox/runit/svlogd.c


Ignore:
Timestamp:
Dec 20, 2016, 4:07:32 PM (7 years ago)
Author:
Bruno Cornec
Message:

New 3?3 banch for incorporation of latest busybox 1.25. Changing minor version to handle potential incompatibilities.

Location:
branches/3.3
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/3.3/mindi-busybox/runit/svlogd.c

    r3232 r3621  
    2727
    2828/* Busyboxed by Denys Vlasenko <vda.linux@googlemail.com> */
    29 /* TODO: depends on runit_lib.c - review and reduce/eliminate */
    3029
    3130/*
     
    126125*/
    127126
     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
    128139//usage:#define svlogd_trivial_usage
    129140//usage:       "[-ttv] [-r C] [-R CHARS] [-l MATCHLEN] [-b BUFLEN] DIR..."
     
    143154//usage:   "\n""E,ePATTERN - (de)select line for stderr"
    144155
    145 #include <sys/poll.h>
    146156#include <sys/file.h>
    147157#include "libbb.h"
     158#include "common_bufsiz.h"
    148159#include "runit_lib.h"
    149160
     
    224235#define fl_flag_0      (G.fl_flag_0     )
    225236#define dirn           (G.dirn          )
     237#define line bb_common_bufsiz1
    226238#define INIT_G() do { \
     239    setup_common_bufsiz(); \
    227240    SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
    228241    linemax = 1000; \
     
    231244    replace = ""; \
    232245} while (0)
    233 
    234 #define line bb_common_bufsiz1
    235246
    236247
     
    746757                break;
    747758            case 's': {
    748                 static const struct suffix_mult km_suffixes[] = {
    749                     { "k", 1024 },
    750                     { "m", 1024*1024 },
    751                     { "", 0 }
    752                 };
    753759                ld->sizemax = xatou_sfx(&s[1], km_suffixes);
    754760                break;
     
    10411047    if (opt & 2) if (!repl) repl = '_'; // -R
    10421048    if (opt & 4) { // -l
    1043         linemax = xatou_range(l, 0, BUFSIZ-26);
     1049        linemax = xatou_range(l, 0, COMMON_BUFSIZE-26);
    10441050        if (linemax == 0)
    1045             linemax = BUFSIZ-26;
     1051            linemax = COMMON_BUFSIZE-26;
    10461052        if (linemax < 256)
    10471053            linemax = 256;
Note: See TracChangeset for help on using the changeset viewer.