--- ./sysklogd/logread.c.orig 2006-03-30 22:03:21.000000000 +0200 +++ ./sysklogd/logread.c 2006-03-30 22:03:23.000000000 +0200 @@ -36,7 +36,7 @@ #include #include "busybox.h" -static const long KEY_ID = 0x414e4547; /*"GENA"*/ +static long KEY_ID = 0x414e4500; /*"\0ENA"*/ static struct shbuf_ds { int size; // size of data written @@ -80,12 +80,17 @@ int i; int follow=0; - if (argc == 2 && strcmp(argv[1],"-f")==0) { - follow = 1; - } else { - /* no options, no getopt */ - if (argc > 1) - bb_show_usage(); + argc--; argv++; + while (argc > 0) { + if (!strcmp(argv[0], "-f")) + follow = 1; + else if (argc > 1 && !strcmp(argv[0], "-K")) { + KEY_ID = (KEY_ID & ~0xFF) | (atoi(argv[1]) & 0xFF); + argc--; argv++; + } + else + bb_show_usage(); + argc--; argv++; } // handle intrrupt signal --- ./include/usage.h.orig 2006-03-30 22:04:04.000000000 +0200 +++ ./include/usage.h 2006-03-30 22:06:15.000000000 +0200 @@ -1655,6 +1655,7 @@ "Shows the messages from syslogd (using circular buffer).\n\n" \ "Options:\n" \ - "\t-f\t\toutput data as the log grows" + "\t-f\t\toutput data as the log grows\n" \ + "\t-K KEYID\taccess logs with key KEYID (0..255, default=0)" #define losetup_trivial_usage \ "[-od] LOOPDEVICE [FILE]"