aboutsummaryrefslogtreecommitdiffstats
path: root/roots.h
diff options
context:
space:
mode:
Diffstat (limited to 'roots.h')
-rw-r--r--roots.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/roots.h b/roots.h
index 6e3b243..f3e1903 100644
--- a/roots.h
+++ b/roots.h
@@ -18,6 +18,7 @@
#define RECOVERY_ROOTS_H_
#include "common.h"
+#include <fs_mgr.h>
// Load and parse volume data from /etc/recovery.fstab.
void load_volume_table();
@@ -27,6 +28,7 @@ Volume* volume_for_path(const char* path);
// Make sure that the volume 'path' is on is mounted. Returns 0 on
// success (volume is mounted).
+int ensure_volume_mounted(Volume* v);
int ensure_path_mounted(const char* path);
// Similar to ensure_path_mounted, but allows one to specify the mount_point.
@@ -34,7 +36,8 @@ int ensure_path_mounted_at(const char* path, const char* 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_volume_unmounted(Volume *v, bool detach=false);
+int ensure_path_unmounted(const char* path, bool detach=false);
// Reformat the given volume (must be the mount point only, eg
// "/cache"), no paths permitted. Attempts to unmount the volume if
@@ -45,4 +48,10 @@ int format_volume(const char* volume);
// mounted (/tmp and /cache) are mounted. Returns 0 on success.
int setup_install_mounts();
+int get_num_volumes();
+
+int is_data_media();
+
+#define MAX_NUM_MANAGED_VOLUMES 10
+
#endif // RECOVERY_ROOTS_H_