OSDN Git Service

Revert "Stop building getprop"
authorTom Cherry <tomcherry@google.com>
Tue, 9 Jan 2018 00:27:45 +0000 (00:27 +0000)
committerTom Cherry <tomcherry@google.com>
Tue, 9 Jan 2018 00:27:45 +0000 (00:27 +0000)
This reverts commit 2a7219cdf2fa1b9bd080f9377ed5f2cf993600a3.

Change-Id: I24118e45c9f7c99699959b58c2ccbd4a0fd9414e

.config
Android.mk
generated/config.h
generated/flags.h

diff --git a/.config b/.config
index 92ea2cc..868534e 100644 (file)
--- a/.config
+++ b/.config
@@ -116,7 +116,7 @@ CONFIG_FSFREEZE=y
 # CONFIG_FTPPUT is not set
 CONFIG_GETENFORCE=y
 CONFIG_GETFATTR=y
-# CONFIG_GETPROP is not set
+CONFIG_GETPROP=y
 # CONFIG_GETTY is not set
 CONFIG_GREP=y
 # CONFIG_GROUPADD is not set
index f6f49e1..ac05206 100644 (file)
@@ -66,6 +66,7 @@ common_SRC_FILES := \
     lib/xwrap.c \
     main.c \
     toys/android/getenforce.c \
+    toys/android/getprop.c \
     toys/android/load_policy.c \
     toys/android/log.c \
     toys/android/restorecon.c \
@@ -281,6 +282,7 @@ ALL_TOOLS := \
     flock \
     free \
     getenforce \
+    getprop \
     groups \
     gunzip \
     gzip \
index d5472e2..593ca7b 100644 (file)
 #define USE_GETENFORCE(...) __VA_ARGS__
 #define CFG_GETFATTR 1
 #define USE_GETFATTR(...) __VA_ARGS__
-#define CFG_GETPROP 0
-#define USE_GETPROP(...)
+#define CFG_GETPROP 1
+#define USE_GETPROP(...) __VA_ARGS__
 #define CFG_GETTY 0
 #define USE_GETTY(...)
 #define CFG_GREP 1
index f77c67b..d9dcedc 100644 (file)
 #undef FLAG_d
 #endif
 
-// getprop   >2Z
+// getprop >2Z >2Z
 #undef OPTSTR_getprop
 #define OPTSTR_getprop ">2Z"
 #ifdef CLEANUP_getprop
 #ifndef TT
 #define TT this.getprop
 #endif
-#define FLAG_Z (FORCED_FLAG<<0)
+#define FLAG_Z (1<<0)
 #endif
 
 #ifdef FOR_getty