mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
busybox: update upstream patches
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
7bbca7fa69
commit
a49e853d78
@ -0,0 +1,11 @@
|
||||
--- busybox-1.19.2/include/platform.h
|
||||
+++ busybox-1.19.2-android/include/platform.h
|
||||
@@ -433,7 +433,7 @@ typedef unsigned smalluint;
|
||||
# undef HAVE_STPCPY
|
||||
#endif
|
||||
|
||||
-#if defined(ANDROID)
|
||||
+#if defined(ANDROID) || defined(__ANDROID__)
|
||||
# undef HAVE_DPRINTF
|
||||
# undef HAVE_GETLINE
|
||||
# undef HAVE_STPCPY
|
@ -0,0 +1,19 @@
|
||||
--- busybox-1.19.2/applets/applet_tables.c
|
||||
+++ busybox-1.19.2-buildsys/applets/applet_tables.c
|
||||
@@ -80,8 +80,15 @@ int main(int argc, char **argv)
|
||||
|
||||
printf("#define NUM_APPLETS %u\n", NUM_APPLETS);
|
||||
if (NUM_APPLETS == 1) {
|
||||
+ char *dash_to_underscore, *p;
|
||||
printf("#define SINGLE_APPLET_STR \"%s\"\n", applets[0].name);
|
||||
- printf("#define SINGLE_APPLET_MAIN %s_main\n", applets[0].name);
|
||||
+ /* Example: "ether-wake" -> "ether_wake" */
|
||||
+ p = dash_to_underscore = strdup(applets[0].name);
|
||||
+ p--;
|
||||
+ while (*++p)
|
||||
+ if (*p == '-')
|
||||
+ *p = '_';
|
||||
+ printf("#define SINGLE_APPLET_MAIN %s_main\n", dash_to_underscore);
|
||||
}
|
||||
printf("\n");
|
||||
|
@ -0,0 +1,20 @@
|
||||
--- busybox-1.19.2/sysklogd/syslogd.c
|
||||
+++ busybox-1.19.2-syslogd/sysklogd/syslogd.c
|
||||
@@ -278,7 +278,7 @@ static void parse_syslogdcfg(const char
|
||||
parser_t *parser;
|
||||
|
||||
parser = config_open2(file ? file : "/etc/syslog.conf",
|
||||
- file ? xfopen_for_read : fopen_or_warn_stdin);
|
||||
+ file ? xfopen_for_read : fopen_for_read);
|
||||
if (!parser)
|
||||
/* didn't find default /etc/syslog.conf */
|
||||
/* proceed as if we built busybox without config support */
|
||||
@@ -678,7 +678,7 @@ static void timestamp_and_log(int pri, c
|
||||
if (LOG_PRI(pri) < G.logLevel) {
|
||||
#if ENABLE_FEATURE_IPC_SYSLOG
|
||||
if ((option_mask32 & OPT_circularlog) && G.shbuf) {
|
||||
- log_to_shmem(msg);
|
||||
+ log_to_shmem(G.printbuf);
|
||||
return;
|
||||
}
|
||||
#endif
|
43
packages/sysutils/busybox/patches/busybox-1.19.2-tail.patch
Normal file
43
packages/sysutils/busybox/patches/busybox-1.19.2-tail.patch
Normal file
@ -0,0 +1,43 @@
|
||||
--- busybox-1.19.2/coreutils/tail.c
|
||||
+++ busybox-1.19.2-tail/coreutils/tail.c
|
||||
@@ -203,7 +203,7 @@ int tail_main(int argc, char **argv)
|
||||
int fd = fds[i];
|
||||
|
||||
if (ENABLE_FEATURE_FANCY_TAIL && fd < 0)
|
||||
- continue; /* may happen with -E */
|
||||
+ continue; /* may happen with -F */
|
||||
|
||||
if (nfiles > header_threshhold) {
|
||||
tail_xprint_header(fmt, argv[i]);
|
||||
@@ -252,14 +252,14 @@ int tail_main(int argc, char **argv)
|
||||
* Used only by +N code ("start from Nth", 1-based): */
|
||||
seen = 1;
|
||||
newlines_seen = 0;
|
||||
- while ((nread = tail_read(fd, buf, tailbufsize-taillen)) > 0) {
|
||||
+ while ((nread = tail_read(fd, buf, tailbufsize - taillen)) > 0) {
|
||||
if (G.from_top) {
|
||||
int nwrite = nread;
|
||||
if (seen < count) {
|
||||
/* We need to skip a few more bytes/lines */
|
||||
if (COUNT_BYTES) {
|
||||
nwrite -= (count - seen);
|
||||
- seen = count;
|
||||
+ seen += nread;
|
||||
} else {
|
||||
char *s = buf;
|
||||
do {
|
||||
--- busybox-1.19.2/testsuite/tail.tests
|
||||
+++ busybox-1.19.2-tail/testsuite/tail.tests
|
||||
@@ -14,4 +14,12 @@ testing "tail: +N with N > file length"
|
||||
"0\n" \
|
||||
"" "qw"
|
||||
|
||||
+testing "tail: -c +N with largish N" \
|
||||
+ "
|
||||
+ dd if=/dev/zero bs=16k count=1 2>/dev/null | tail -c +8200 | wc -c;
|
||||
+ dd if=/dev/zero bs=16k count=1 2>/dev/null | tail -c +8208 | wc -c;
|
||||
+ " \
|
||||
+ "8185\n8177\n" \
|
||||
+ "" ""
|
||||
+
|
||||
exit $FAILCOUNT
|
Loading…
x
Reference in New Issue
Block a user