svn commit: trunk/busybox: coreutils include libbb sysklogd

Bernhard Fischer rep.nop at aon.at
Thu Jan 4 10:15:51 PST 2007


On Thu, Jan 04, 2007 at 10:00:00AM -0800, vda at busybox.net wrote:
>Author: vda
>Date: 2007-01-04 09:59:59 -0800 (Thu, 04 Jan 2007)
>New Revision: 17156
>
>Log:
>new libbb func: xmalloc_realpath (+ use it where makes sense)
>syslogd, logread: add debugging code (disabled)
>syslogs: drastically smaller bss; fix "-C n" behaviour

Just curious as to the stats for this change?

>--- trunk/busybox/include/usage.h	2007-01-04 17:57:54 UTC (rev 17155)
>+++ trunk/busybox/include/usage.h	2007-01-04 17:59:59 UTC (rev 17156)
>@@ -3021,7 +3021,8 @@
>        "\n	-R HOST[:PORT]	Log to IP or hostname on PORT (default PORT=514/UDP)" \
>        "\n	-L	Log locally and via network logging (default is network only)") \
> 	USE_FEATURE_IPC_SYSLOG( \
>-       "\n	-C [size(KiB)]	Log to a circular buffer (read the buffer using logread)")
->+       "\n	-C[size(KiB)]	Log to a circular buffer (read the buffer using logread)")
+>+       "\n	-C[size(KiB)]	Log to a circular buffer (read via logread)")

is smaller and should be sufficiently clear.

>+char *xmalloc_realpath(const char *path)
>+{

Didn't try, but would using attribute_malloc (that we had in platform.h
but someone apparently removed it since it wasn't used yet..) be
benefical?

>+static void error_exit(const char *str) ATTRIBUTE_NORETURN;
>+static void error_exit(const char *str)
>+{
>+	//release all acquired resources
>+	if (log_shmid != -1)
>+		shmdt(buf);
>+	bb_perror_msg_and_die(str);
>+}

Identical to ipcsyslog_cleanup(), no?
[snip]


More information about the busybox mailing list