[Feature][ZXW-241]merge P56U01 version
Only Configure: No
Affected branch: master
Affected module: unknow
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No
Change-Id: I7985538dde6951dd824c36149bf9a1e3ca23c734
diff --git a/ap/app/busybox/src/libbb/endofname.c b/ap/app/busybox/src/libbb/endofname.c
new file mode 100755
index 0000000..305f093
--- /dev/null
+++ b/ap/app/busybox/src/libbb/endofname.c
@@ -0,0 +1,26 @@
+/*
+ * Utility routines.
+ *
+ * Copyright (C) 2013 Denys Vlasenko
+ *
+ * Licensed under GPLv2, see file LICENSE in this source tree.
+ */
+
+//kbuild:lib-y += endofname.o
+
+#include "libbb.h"
+
+#define is_name(c) ((c) == '_' || isalpha((unsigned char)(c)))
+#define is_in_name(c) ((c) == '_' || isalnum((unsigned char)(c)))
+
+const char* FAST_FUNC
+endofname(const char *name)
+{
+ if (!is_name(*name))
+ return name;
+ while (*++name) {
+ if (!is_in_name(*name))
+ break;
+ }
+ return name;
+}
diff --git a/ap/app/busybox/src/libbb/verror_msg.c b/ap/app/busybox/src/libbb/verror_msg.c
old mode 100644
new mode 100755
index ee95be3..8c793a4
--- a/ap/app/busybox/src/libbb/verror_msg.c
+++ b/ap/app/busybox/src/libbb/verror_msg.c
@@ -156,3 +156,13 @@
bb_verror_msg(s, p, NULL);
va_end(p);
}
+
+void FAST_FUNC bb_simple_error_msg(const char *s)
+{
+ bb_error_msg("%s", s);
+}
+
+void FAST_FUNC bb_simple_error_msg_and_die(const char *s)
+{
+ bb_error_msg_and_die("%s", s);
+}
diff --git a/ap/app/busybox/src/libbb/xfuncs_printf.c b/ap/app/busybox/src/libbb/xfuncs_printf.c
old mode 100644
new mode 100755
index 05aa07c..d3bdd07
--- a/ap/app/busybox/src/libbb/xfuncs_printf.c
+++ b/ap/app/busybox/src/libbb/xfuncs_printf.c
@@ -27,6 +27,11 @@
* fail, so callers never need to check for errors. If it returned, it
* succeeded. */
+void FAST_FUNC bb_die_memory_exhausted(void)
+{
+ bb_simple_error_msg_and_die(bb_msg_memory_exhausted);
+}
+
#ifndef DMALLOC
/* dmalloc provides variants of these that do abort() on failure.
* Since dmalloc's prototypes overwrite the impls here as they are