OSDN Git Service

Disable CFG_TOYBOX_DEBUG for now.
authorElliott Hughes <enh@google.com>
Thu, 21 Jan 2016 06:23:26 +0000 (22:23 -0800)
committerElliott Hughes <enh@google.com>
Thu, 21 Jan 2016 06:23:26 +0000 (22:23 -0800)
We turned on CFG_TOYBOX_DEBUG so ls would be asan-clean, but that turns out
to have broken mount for non-root users. So let's turn CFG_TOYBOX_DEBUG off
for now, but let's also say that ls should always be asan-clean on Android.

Bug: http://b/26647560
Change-Id: I5392aedd168c1e765e3319e3c76e996040b7e8ab

.config
generated/config.h
generated/flags.h
toys/posix/ls.c

diff --git a/.config b/.config
index 6af4866..24f838a 100644 (file)
--- a/.config
+++ b/.config
@@ -328,7 +328,7 @@ CONFIG_TOYBOX_HELP_DASHDASH=y
 CONFIG_TOYBOX_I18N=y
 # CONFIG_TOYBOX_FREE is not set
 # CONFIG_TOYBOX_NORECURSE is not set
-CONFIG_TOYBOX_DEBUG=y
+# CONFIG_TOYBOX_DEBUG is not set
 CONFIG_TOYBOX_UID_SYS=100
 CONFIG_TOYBOX_UID_USR=500
 # CONFIG_TOYBOX_MUSL_NOMMU_IS_BROKEN is not set
index 92eacc3..32110f9 100644 (file)
 #define USE_TOYBOX_FREE(...)
 #define CFG_TOYBOX_NORECURSE 0
 #define USE_TOYBOX_NORECURSE(...)
-#define CFG_TOYBOX_DEBUG 1
-#define USE_TOYBOX_DEBUG(...) __VA_ARGS__
+#define CFG_TOYBOX_DEBUG 0
+#define USE_TOYBOX_DEBUG(...)
 #define CFG_TOYBOX_UID_SYS 100
 #define CFG_TOYBOX_UID_USR 500
 #define CFG_TOYBOX_MUSL_NOMMU_IS_BROKEN 0
index 62321f9..b4f594a 100644 (file)
 #undef FLAG_d
 #endif
 
-// patch xulp#i:R xulp#i:R
+// patch ulp#i:R xulp#i:R
 #undef OPTSTR_patch
-#define OPTSTR_patch "xulp#i:R"
+#define OPTSTR_patch "ulp#i:R"
 #ifdef CLEANUP_patch
 #undef CLEANUP_patch
 #undef FOR_patch
 #define FLAG_p (1<<2)
 #define FLAG_l (1<<3)
 #define FLAG_u (1<<4)
-#define FLAG_x (1<<5)
+#define FLAG_x (FORCED_FLAG<<5)
 #endif
 
 #ifdef FOR_pgrep
index 08ae695..19a08f9 100644 (file)
@@ -299,7 +299,7 @@ static void listfiles(int dirfd, struct dirtree *indir)
   }
 
   memset(totals, 0, sizeof(totals));
-  if (CFG_TOYBOX_DEBUG) memset(len, 0, sizeof(len));
+  if (CFG_TOYBOX_ON_ANDROID || CFG_TOYBOX_DEBUG) memset(len, 0, sizeof(len));
 
   // Top level directory was already populated by main()
   if (!indir->parent) {