Ignore:
Timestamp:
Jan 1, 2014, 12:47:38 AM (10 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.21.1
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi-busybox/util-linux/dmesg.c

    r2725 r3232  
    99 * Licensed under GPLv2, see file LICENSE in this source tree.
    1010 */
     11
     12//usage:#define dmesg_trivial_usage
     13//usage:       "[-c] [-n LEVEL] [-s SIZE]"
     14//usage:#define dmesg_full_usage "\n\n"
     15//usage:       "Print or control the kernel ring buffer\n"
     16//usage:     "\n    -c      Clear ring buffer after printing"
     17//usage:     "\n    -n LEVEL    Set console logging level"
     18//usage:     "\n    -s SIZE     Buffer size"
     19
    1120#include <sys/klog.h>
    1221#include "libbb.h"
     
    5160        int in = 0;
    5261
    53         /* Skip <#> at the start of lines */
     62        /* Skip <[0-9]+> at the start of lines */
    5463        while (1) {
    5564            if (last == '\n' && buf[in] == '<') {
    56                 in += 3;
    57                 if (in >= len)
    58                     break;
     65                while (buf[in++] != '>' && in < len)
     66                    ;
     67            } else {
     68                last = buf[in++];
     69                putchar(last);
    5970            }
    60             last = buf[in];
    61             putchar(last);
    62             in++;
    6371            if (in >= len)
    6472                break;
Note: See TracChangeset for help on using the changeset viewer.