diff options
Diffstat (limited to '')
-rw-r--r-- | roots.h | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -19,7 +19,9 @@ #include <string> -typedef struct fstab_rec Volume; +#include <fstab/fstab.h> + +using Volume = android::fs_mgr::FstabEntry; // Load and parse volume data from /etc/recovery.fstab. void load_volume_table(); @@ -29,28 +31,32 @@ Volume* volume_for_mount_point(const std::string& mount_point); // Make sure that the volume 'path' is on is mounted. Returns 0 on // success (volume is mounted). -int ensure_path_mounted(const char* path); +int ensure_path_mounted(const std::string& path); // Similar to ensure_path_mounted, but allows one to specify the mount_point. -int ensure_path_mounted_at(const char* path, const char* mount_point); +int ensure_path_mounted_at(const std::string& path, const std::string& mount_point); // Make sure that the volume 'path' is on is unmounted. Returns 0 on // success (volume is unmounted); -int ensure_path_unmounted(const char* path); +int ensure_path_unmounted(const std::string& path); // Reformat the given volume (must be the mount point only, eg // "/cache"), no paths permitted. Attempts to unmount the volume if // it is mounted. -int format_volume(const char* volume); +int format_volume(const std::string& volume); // Reformat the given volume (must be the mount point only, eg // "/cache"), no paths permitted. Attempts to unmount the volume if // it is mounted. // Copies 'directory' to root of the newly formatted volume -int format_volume(const char* volume, const char* directory); +int format_volume(const std::string& volume, const std::string& directory); // Ensure that all and only the volumes that packages expect to find // mounted (/tmp and /cache) are mounted. Returns 0 on success. int setup_install_mounts(); +bool logical_partitions_mapped(); + +std::string get_system_root(); + #endif // RECOVERY_ROOTS_H_ |