[uClinux-dev] Weired chars with remote log in busybox sylogd.c in uClinux-dist-test-20050808

Harald Küthe Harald.Kuethe at controlware.de
Mon Aug 29 06:54:01 EDT 2005


I'm using the remote log feature of busybox and with the latest testrelease I get an 0x0a at the end of the string.
This is displayed as a weird char in my syslog deamon.
Following simple diff strips it off for remote log.

Regards
Harald

--- ../uClinux-test-050814/uClinux-dist-test/user/busybox/sysklogd/syslogd.c	2005-07-05 02:14:00.000000000 +0200
+++ user/busybox/sysklogd/syslogd.c	2005-08-29 11:39:51.000000000 +0200
@@ -151,6 +151,7 @@
 #ifdef CONFIG_FEATURE_REMOTE_LOG
 			case SYSLOG_TARGET_REMOTE:
 				debug_printf("Logging to remote target");
+				if ('\n' == buf[strlen(buf)-1]) buf[strlen(buf)-1] = '\0';
 				log_remote_message((syslogd_remote_config_t *)target, buf);
 				break;
 #endif 




More information about the uClinux-dev mailing list