adb: enable/disable verity expected overlayfs errors.
Expect EBUSY for overlayfs teardown, and ENOENT for setup. Test: adb-remount-test.sh Bug: 131614849 Change-Id: I0fb351d6d5fe758021c9e9043f57863c7a194c12
This commit is contained in:
parent
3c0d7e8d28
commit
5828b77a3d
|
@ -111,8 +111,11 @@ static bool set_verity_enabled_state(int fd, const char* block_device, const cha
|
|||
WriteFdFmt(fd, "%s overlayfs for %s\n", enable ? "disabling" : "using", mount_point);
|
||||
}
|
||||
} else if (errno) {
|
||||
WriteFdFmt(fd, "Overlayfs %s for %s failed with error %s\n", enable ? "teardown" : "setup",
|
||||
mount_point, strerror(errno));
|
||||
int expected_errno = enable ? EBUSY : ENOENT;
|
||||
if (errno != expected_errno) {
|
||||
WriteFdFmt(fd, "Overlayfs %s for %s failed with error %s\n",
|
||||
enable ? "teardown" : "setup", mount_point, strerror(errno));
|
||||
}
|
||||
}
|
||||
WriteFdFmt(fd, "Verity %s on %s\n", enable ? "enabled" : "disabled", mount_point);
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue