diff options
author | Peter Korsgaard <jacmet@sunsite.dk> | 2008-12-10 13:46:19 +0000 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2008-12-10 13:46:19 +0000 |
commit | cdd72cd08ff91be59ba6fecb1261cd32d29c7df9 (patch) | |
tree | e49647c4d0ac38c5a2b9754a853f87d8fc63a053 | |
parent | cbe9f1b8d28e24097a87adacbfed94d0609650ec (diff) | |
download | buildroot-novena-cdd72cd08ff91be59ba6fecb1261cd32d29c7df9.tar.gz buildroot-novena-cdd72cd08ff91be59ba6fecb1261cd32d29c7df9.zip |
busybox: additional 1.13.1 fixes
-rw-r--r-- | package/busybox/busybox-1.13.1-init.patch | 28 | ||||
-rw-r--r-- | package/busybox/busybox-1.13.1-printf.patch | 19 |
2 files changed, 47 insertions, 0 deletions
diff --git a/package/busybox/busybox-1.13.1-init.patch b/package/busybox/busybox-1.13.1-init.patch new file mode 100644 index 000000000..23187720f --- /dev/null +++ b/package/busybox/busybox-1.13.1-init.patch @@ -0,0 +1,28 @@ +--- busybox-1.13.1/init/init.c Sat Nov 29 07:48:56 2008 ++++ busybox-1.13.1-init/init/init.c Tue Dec 9 22:17:43 2008 +@@ -118,18 +118,18 @@ + + msg[0] = '\r'; + va_start(arguments, fmt); +- l = vsnprintf(msg + 1, sizeof(msg) - 2, fmt, arguments); +- if (l > sizeof(msg) - 2) +- l = sizeof(msg) - 2; ++ l = 1 + vsnprintf(msg + 1, sizeof(msg) - 2, fmt, arguments); ++ if (l > sizeof(msg) - 1) ++ l = sizeof(msg) - 1; + msg[l] = '\0'; + va_end(arguments); + + if (ENABLE_FEATURE_INIT_SYSLOG) { +- /* Log the message to syslogd */ + if (where & L_LOG) { +- /* don't print out "\r" */ +- openlog(applet_name, 0, LOG_DAEMON); +- syslog(LOG_INFO, "init: %s", msg + 1); ++ /* Log the message to syslogd */ ++ openlog("init", 0, LOG_DAEMON); ++ /* don't print "\r" */ ++ syslog(LOG_INFO, "%s", msg + 1); + closelog(); + } + msg[l++] = '\n'; diff --git a/package/busybox/busybox-1.13.1-printf.patch b/package/busybox/busybox-1.13.1-printf.patch new file mode 100644 index 000000000..43f4135b6 --- /dev/null +++ b/package/busybox/busybox-1.13.1-printf.patch @@ -0,0 +1,19 @@ +--- busybox-1.13.1/coreutils/printf.c Sun Nov 9 18:28:07 2008 ++++ busybox-1.13.1-printf/coreutils/printf.c Wed Dec 10 12:50:55 2008 +@@ -359,8 +359,15 @@ + * We will mimic coreutils. */ + if (argv[1] && argv[1][0] == '-' && argv[1][1] == '-' && !argv[1][2]) + argv++; +- if (!argv[1]) ++ if (!argv[1]) { ++ if (ENABLE_ASH_BUILTIN_PRINTF ++ && applet_name[0] != 'p' ++ ) { ++ bb_error_msg("usage: printf FORMAT [ARGUMENT...]"); ++ return 2; /* bash compat */ ++ } + bb_show_usage(); ++ } + + format = argv[1]; + argv2 = argv + 2; |