Merge "SYSTEM_ROOT -> get_system_root"

This commit is contained in:
Yifan Hong
2018-11-30 22:07:24 +00:00
committed by Gerrit Code Review
4 changed files with 17 additions and 18 deletions
+9
View File
@@ -45,6 +45,7 @@
static struct fstab* fstab = nullptr;
static bool did_map_logical_partitions = false;
static constexpr const char* SYSTEM_ROOT = "/system";
extern struct selabel_handle* sehandle;
@@ -408,3 +409,11 @@ int setup_install_mounts() {
bool logical_partitions_mapped() {
return did_map_logical_partitions;
}
std::string get_system_root() {
if (volume_for_mount_point(SYSTEM_ROOT) == nullptr) {
return "/";
} else {
return SYSTEM_ROOT;
}
}