sumo migration: busybox: update to version 1.27.2

Removed patch files because it was integrated in the source code.

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
This commit is contained in:
Arturo Buzarra 2018-12-17 16:07:56 +01:00
parent 2b6db8f0b9
commit 9f972aa749
19 changed files with 1 additions and 177 deletions

View File

@ -1,109 +0,0 @@
From: Javier Viguera <javier.viguera@digi.com>
Date: Wed, 20 Apr 2011 11:08:27 +0200
Subject: [PATCH] del-baudrates
http://thread.gmane.org/gmane.linux.busybox/22612
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
---
libbb/speed_table.c | 67 ++++++++++++++++++++++++++++++++++++++++++-----------
1 file changed, 54 insertions(+), 13 deletions(-)
diff --git a/libbb/speed_table.c b/libbb/speed_table.c
index 174d531..0e57de4 100644
--- a/libbb/speed_table.c
+++ b/libbb/speed_table.c
@@ -34,30 +34,68 @@ static const struct speed_map speeds[] = {
{B2400, 2400},
{B4800, 4800},
{B9600, 9600},
-#ifdef B19200
- {B19200, 19200},
+/* To fit in 16 bits with larget values, scale by 256 or by 10000 and mark */
+#define MARKER_MASK 0xc000U
+#define MARKER_256 0x8000U
+#define MARKER_10k 0x4000U
+#define SCALE_256(x) ((x)/256 | MARKER_256)
+#define SCALE_10k(x) ((x)/10000 | MARKER_10k)
+#define DO_256(x) {B##x, SCALE_256(x)}
+#define DO_10k(x) {B##x, SCALE_10k(x)}
+#ifdef B19200
+ DO_256(19200),
#elif defined(EXTA)
- {EXTA, 19200},
+ {EXTA, SCALE_256(19200)},
#endif
-#ifdef B38400
- {B38400, 38400/256 + 0x8000U},
+#ifdef B38400
+ DO_256(38400),
#elif defined(EXTB)
- {EXTB, 38400/256 + 0x8000U},
+ {EXTB, SCALE_256(38400)},
#endif
#ifdef B57600
- {B57600, 57600/256 + 0x8000U},
+ DO_256(57600),
#endif
#ifdef B115200
- {B115200, 115200/256 + 0x8000U},
+ DO_256(115200),
#endif
#ifdef B230400
- {B230400, 230400/256 + 0x8000U},
+ DO_256(230400),
#endif
#ifdef B460800
- {B460800, 460800/256 + 0x8000U},
+ DO_256(460800),
+#endif
+#ifdef B500000
+ DO_10k(500000),
+#endif
+#ifdef B576000
+ DO_256(576000),
#endif
#ifdef B921600
- {B921600, 921600/256 + 0x8000U},
+ DO_256(921600),
+#endif
+#ifdef B1000000
+ DO_10k(1000000),
+#endif
+#ifdef B1152000
+ DO_256(1152000),
+#endif
+#ifdef B1500000
+ DO_10k(1500000),
+#endif
+#ifdef B2000000
+ DO_10k(2000000),
+#endif
+#ifdef B2500000
+ DO_10k(2500000),
+#endif
+#ifdef B3000000
+ DO_10k(3000000),
+#endif
+#ifdef B3500000
+ DO_10k(3500000),
+#endif
+#ifdef B4000000
+ DO_10k(4000000),
#endif
};
@@ -69,8 +107,11 @@ unsigned FAST_FUNC tty_baud_to_value(speed_t speed)
do {
if (speed == speeds[i].speed) {
- if (speeds[i].value & 0x8000U) {
- return ((unsigned long) (speeds[i].value) & 0x7fffU) * 256;
+ if (speeds[i].value & MARKER_256) {
+ return ((unsigned long) (speeds[i].value) & ~MARKER_MASK) * 256;
+ }
+ if (speeds[i].value & MARKER_10k) {
+ return ((unsigned long) (speeds[i].value) & ~MARKER_MASK) * 10000;
}
return speeds[i].value;
}

View File

@ -1,65 +0,0 @@
From: Jo-Philipp Wich <jow@openwrt.org>
Date: Tue, 25 Sep 2012 14:06:13 +0200
Subject: [PATCH] ntpd: indefinitely try to resolve peer addresses
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
(cherry picked from commit c5daea7ba5200158fae2e68714725c6bf7ee6dbb)
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
Conflicts:
networking/ntpd.c
---
networking/ntpd.c | 25 +++++++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
diff --git a/networking/ntpd.c b/networking/ntpd.c
index 9732c9b..89421e5 100644
--- a/networking/ntpd.c
+++ b/networking/ntpd.c
@@ -265,6 +265,7 @@ typedef struct {
typedef struct {
len_and_sockaddr *p_lsa;
char *p_dotted;
+ char *p_hostname;
int p_fd;
int datapoint_idx;
uint32_t lastpkt_refid;
@@ -766,8 +767,9 @@ add_peers(const char *s)
peer_t *p;
p = xzalloc(sizeof(*p));
- p->p_lsa = xhost2sockaddr(s, 123);
- p->p_dotted = xmalloc_sockaddr2dotted_noport(&p->p_lsa->u.sa);
+ p->p_hostname = s;
+ p->p_lsa = NULL;
+ p->p_dotted = NULL;
p->p_fd = -1;
p->p_xmt_msg.m_status = MODE_CLIENT | (NTP_VERSION << 3);
p->next_action_time = G.cur_time; /* = set_next(p, 0); */
@@ -816,6 +818,25 @@ send_query_to_peer(peer_t *p)
*
* Uncomment this and use strace to see it in action:
*/
+
+ /* See if the peer hostname already resolved yet, if not, retry to resolv and return on failure */
+ if (!p->p_lsa)
+ {
+ p->p_lsa = host2sockaddr(p->p_hostname, 123);
+
+ if (p->p_lsa)
+ {
+ p->p_dotted = xmalloc_sockaddr2dotted_noport(&p->p_lsa->u.sa);
+ VERB1 bb_error_msg("resolved peer %s to %s", p->p_hostname, p->p_dotted);
+ }
+ else
+ {
+ set_next(p, RETRY_INTERVAL);
+ VERB1 bb_error_msg("could not resolve peer %s, skipping", p->p_hostname);
+ return;
+ }
+ }
+
#define PROBE_LOCAL_ADDR /* { len_and_sockaddr lsa; lsa.len = LSA_SIZEOF_SA; getsockname(p->query.fd, &lsa.u.sa, &lsa.len); } */
if (p->p_fd == -1) {

View File

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

@ -2,9 +2,7 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${BP}:" FILESEXTRAPATHS_prepend := "${THISDIR}/${BP}:"
SRC_URI += "file://0001-del-baudrates.patch \ SRC_URI += "file://standby \
file://0002-ntpd-indefinitely-try-to-resolve-peer-addresses.patch \
file://standby \
file://busybox-ntpd \ file://busybox-ntpd \
file://index.html \ file://index.html \
file://digi-logo.png \ file://digi-logo.png \