summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2019-06-12 03:31:33 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2019-06-12 03:31:33 +0000
commitb157040fabcc9168bb42a8e9e8214ccec081b3b6 (patch)
treea1829aa13e5c6c18a2bd1f1d2eda7606b372e416
parent459f38061ee435f2a68c610c50f5b2319c9e7372 (diff)
parent88adf9153093baa6cf5c71a6191b330d80ca5279 (diff)
Snap for 5652667 from 88adf9153093baa6cf5c71a6191b330d80ca5279 to qt-qpr1-release
Change-Id: I776d4086476c7615d9f13b6e258506fc45ada81b
-rw-r--r--adb/client/commandline.cpp18
-rw-r--r--fs_mgr/fs_mgr_fstab.cpp1
2 files changed, 16 insertions, 3 deletions
diff --git a/adb/client/commandline.cpp b/adb/client/commandline.cpp
index e2a17c553..8dd85d7b0 100644
--- a/adb/client/commandline.cpp
+++ b/adb/client/commandline.cpp
@@ -1668,17 +1668,29 @@ int adb_commandline(int argc, const char** argv) {
return 0;
}
} else if (!strcmp(argv[0], "rescue")) {
+ // adb rescue getprop
// adb rescue getprop <prop>
// adb rescue install <filename>
// adb rescue wipe userdata
- if (argc != 3) error_exit("rescue requires two arguments");
+ if (argc < 2) error_exit("rescue requires at least one argument");
if (!strcmp(argv[1], "getprop")) {
- return adb_connect_command(android::base::StringPrintf("rescue-getprop:%s", argv[2]));
+ if (argc == 2) {
+ return adb_connect_command("rescue-getprop:");
+ }
+ if (argc == 3) {
+ return adb_connect_command(
+ android::base::StringPrintf("rescue-getprop:%s", argv[2]));
+ }
+ error_exit("invalid rescue getprop arguments");
} else if (!strcmp(argv[1], "install")) {
+ if (argc != 3) error_exit("rescue install requires two arguments");
if (adb_sideload_install(argv[2], true /* rescue_mode */) != 0) {
return 1;
}
- } else if (!strcmp(argv[1], "wipe") && !strcmp(argv[2], "userdata")) {
+ } else if (!strcmp(argv[1], "wipe")) {
+ if (argc != 3 || strcmp(argv[2], "userdata") != 0) {
+ error_exit("invalid rescue wipe arguments");
+ }
return adb_wipe_devices();
} else {
error_exit("invalid rescue argument");
diff --git a/fs_mgr/fs_mgr_fstab.cpp b/fs_mgr/fs_mgr_fstab.cpp
index e7c175f7f..7df7cfd99 100644
--- a/fs_mgr/fs_mgr_fstab.cpp
+++ b/fs_mgr/fs_mgr_fstab.cpp
@@ -61,6 +61,7 @@ FlagList kMountFlagsList[] = {
{"nodiratime", MS_NODIRATIME},
{"ro", MS_RDONLY},
{"rw", 0},
+ {"sync", MS_SYNCHRONOUS},
{"remount", MS_REMOUNT},
{"bind", MS_BIND},
{"rec", MS_REC},