Merge changes I5b4a87d6,I131315d4

* changes:
  fs_mgr: overlayfs: test: if wait_for_screen times out, skip later
  fs_mgr: remount: add -v option
This commit is contained in:
Mark Salyzyn 2020-02-14 19:20:23 +00:00 committed by Gerrit Code Review
commit 48c0de4907
2 changed files with 18 additions and 6 deletions

View file

@ -80,9 +80,13 @@ const android::fs_mgr::FstabEntry* is_wrapped(const android::fs_mgr::Fstab& over
return &(*it);
}
auto verbose = false;
void MyLogger(android::base::LogId id, android::base::LogSeverity severity, const char* tag,
const char* file, unsigned int line, const char* message) {
fprintf(stderr, "%s\n", message);
if (verbose || severity == android::base::ERROR || message[0] != '[') {
fprintf(stderr, "%s\n", message);
}
static auto logd = android::base::LogdLogger();
logd(id, severity, tag, file, line, message);
}
@ -131,10 +135,14 @@ static int do_remount(int argc, char* argv[]) {
{"fstab", required_argument, nullptr, 'T'},
{"help", no_argument, nullptr, 'h'},
{"reboot", no_argument, nullptr, 'R'},
{"verbose", no_argument, nullptr, 'v'},
{0, 0, nullptr, 0},
};
for (int opt; (opt = ::getopt_long(argc, argv, "hRT:", longopts, nullptr)) != -1;) {
for (int opt; (opt = ::getopt_long(argc, argv, "hRT:v", longopts, nullptr)) != -1;) {
switch (opt) {
case 'h':
usage(SUCCESS);
break;
case 'R':
can_reboot = true;
break;
@ -145,13 +153,13 @@ static int do_remount(int argc, char* argv[]) {
}
fstab_file = optarg;
break;
case 'v':
verbose = true;
break;
default:
LOG(ERROR) << "Bad Argument -" << char(opt);
usage(BADARG);
break;
case 'h':
usage(SUCCESS);
break;
}
}

View file

@ -902,7 +902,11 @@ adb_sh ls -l /dev/block/by-name/ /dev/block/mapper/ </dev/null 2>/dev/null |
done
# If reboot too soon after fresh flash, could trip device update failure logic
wait_for_screen
if ! wait_for_screen && ${screen_wait}; then
screen_wait=false
echo "${ORANGE}[ WARNING ]${NORMAL} not healthy, no launcher, skipping wait for screen" >&2
fi
# Can we test remount -R command?
OVERLAYFS_BACKING="cache mnt/scratch"
overlayfs_supported=true