remount: Remove the "backing" parameter to fs_mgr_overlayfs_setup.

This is unused.

Bug: 241179247
Test: remount
Change-Id: I7a9e07a4cf397c6fc8909a9959e08d1aefa3216a
This commit is contained in:
David Anderson 2022-08-04 11:18:01 -07:00
parent 63432cd317
commit e9e3f6e01b
4 changed files with 6 additions and 8 deletions

View file

@ -97,7 +97,7 @@ bool fs_mgr_overlayfs_mount_all(Fstab*) {
return false;
}
bool fs_mgr_overlayfs_setup(const char*, const char*, bool* change, bool) {
bool fs_mgr_overlayfs_setup(const char*, bool* change, bool) {
if (change) *change = false;
return false;
}
@ -1357,8 +1357,7 @@ bool fs_mgr_overlayfs_mount_all(Fstab* fstab) {
// Returns false if setup not permitted, errno set to last error.
// If something is altered, set *change.
bool fs_mgr_overlayfs_setup(const char* backing, const char* mount_point, bool* change,
bool force) {
bool fs_mgr_overlayfs_setup(const char* mount_point, bool* change, bool force) {
if (change) *change = false;
auto ret = false;
if (fs_mgr_overlayfs_valid() == OverlayfsValidResult::kNotSupported) return ret;
@ -1395,7 +1394,6 @@ bool fs_mgr_overlayfs_setup(const char* backing, const char* mount_point, bool*
std::string dir;
for (const auto& overlay_mount_point : OverlayMountPoints()) {
if (backing && backing[0] && (overlay_mount_point != backing)) continue;
if (overlay_mount_point == kScratchMountPoint) {
if (!fs_mgr_overlayfs_setup_scratch(fstab, change)) continue;
} else {

View file

@ -320,7 +320,7 @@ static RemountStatus CheckVerityAndOverlayfs(Fstab* partitions, RemountCheckResu
if (fs_mgr_wants_overlayfs(&entry)) {
bool change = false;
bool force = result->disabled_verity;
if (!fs_mgr_overlayfs_setup(nullptr, mount_point.c_str(), &change, force)) {
if (!fs_mgr_overlayfs_setup(mount_point.c_str(), &change, force)) {
LOG(ERROR) << "Overlayfs setup for " << mount_point << " failed, skipping";
status = BAD_OVERLAY;
it = partitions->erase(it);

View file

@ -28,8 +28,8 @@ android::fs_mgr::Fstab fs_mgr_overlayfs_candidate_list(const android::fs_mgr::Fs
bool fs_mgr_wants_overlayfs(android::fs_mgr::FstabEntry* entry);
bool fs_mgr_overlayfs_mount_all(android::fs_mgr::Fstab* fstab);
bool fs_mgr_overlayfs_setup(const char* backing = nullptr, const char* mount_point = nullptr,
bool* change = nullptr, bool force = true);
bool fs_mgr_overlayfs_setup(const char* mount_point = nullptr, bool* change = nullptr,
bool force = true);
bool fs_mgr_overlayfs_teardown(const char* mount_point = nullptr, bool* change = nullptr);
bool fs_mgr_overlayfs_is_setup();
bool fs_mgr_has_shared_blocks(const std::string& mount_point, const std::string& dev);

View file

@ -52,7 +52,7 @@ static bool overlayfs_setup(bool enable) {
auto change = false;
errno = 0;
if (enable ? fs_mgr_overlayfs_teardown(nullptr, &change)
: fs_mgr_overlayfs_setup(nullptr, nullptr, &change)) {
: fs_mgr_overlayfs_setup(nullptr, &change)) {
if (change) {
printf("%s overlayfs\n", enable ? "disabling" : "using");
}