am 1bfb375f: Update primary symlinks after mounting.
* commit '1bfb375f77c093a8e16bef4ddeab2681ca126d56':
Update primary symlinks after mounting.
diff --git a/CommandListener.cpp b/CommandListener.cpp
index 8f13771..11eec02 100644
--- a/CommandListener.cpp
+++ b/CommandListener.cpp
@@ -199,14 +199,14 @@
int mountFlags = (argc > 3) ? atoi(argv[3]) : 0;
userid_t mountUserId = (argc > 4) ? atoi(argv[4]) : -1;
- if (mountFlags & android::vold::VolumeBase::MountFlags::kPrimary) {
- vm->setPrimary(vol);
- }
-
vol->setMountFlags(mountFlags);
vol->setMountUserId(mountUserId);
- return sendGenericOkFail(cli, vol->mount());
+ int res = vol->mount();
+ if (mountFlags & android::vold::VolumeBase::MountFlags::kPrimary) {
+ vm->setPrimary(vol);
+ }
+ return sendGenericOkFail(cli, res);
} else if (cmd == "unmount" && argc > 2) {
// unmount [volId]
diff --git a/VolumeManager.cpp b/VolumeManager.cpp
index 5c4f9af..8f73e63 100755
--- a/VolumeManager.cpp
+++ b/VolumeManager.cpp
@@ -379,6 +379,7 @@
SLOGW("Failed to unlink %s: %s", target.c_str(), strerror(errno));
}
}
+ LOG(DEBUG) << "Linking " << source << " to " << target;
if (TEMP_FAILURE_RETRY(symlink(source.c_str(), target.c_str()))) {
SLOGW("Failed to link %s to %s: %s", source.c_str(), target.c_str(),
strerror(errno));