diff options
author | Doug Zongker <dougz@android.com> | 2010-09-21 20:34:39 +0200 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-09-21 20:34:39 +0200 |
commit | 3dba40da1e533c6f419857e4274d9d9dd55868b6 (patch) | |
tree | 17d142b0411f11fcfa3f060f622c0b2dd906577f /roots.h | |
parent | am d7d42089: remove unneeded partition roots (diff) | |
parent | remove the notion of "root path"; support mixed flash types (do not merge) (diff) | |
download | android_bootable_recovery-3dba40da1e533c6f419857e4274d9d9dd55868b6.tar android_bootable_recovery-3dba40da1e533c6f419857e4274d9d9dd55868b6.tar.gz android_bootable_recovery-3dba40da1e533c6f419857e4274d9d9dd55868b6.tar.bz2 android_bootable_recovery-3dba40da1e533c6f419857e4274d9d9dd55868b6.tar.lz android_bootable_recovery-3dba40da1e533c6f419857e4274d9d9dd55868b6.tar.xz android_bootable_recovery-3dba40da1e533c6f419857e4274d9d9dd55868b6.tar.zst android_bootable_recovery-3dba40da1e533c6f419857e4274d9d9dd55868b6.zip |
Diffstat (limited to 'roots.h')
-rw-r--r-- | roots.h | 38 |
1 files changed, 15 insertions, 23 deletions
@@ -17,33 +17,25 @@ #ifndef RECOVERY_ROOTS_H_ #define RECOVERY_ROOTS_H_ -#include "minzip/Zip.h" -#include "mtdutils/mtdutils.h" +#include "common.h" -/* Any of the "root_path" arguments can be paths with relative - * components, like "SYSTEM:a/b/c". - */ - -/* Takes a string like "SYSTEM:lib" and turns it into a string - * like "/system/lib". The translated path is put in out_buf, - * and out_buf is returned if the translation succeeded. - */ -const char *translate_root_path(const char *root_path, - char *out_buf, size_t out_buf_len); +// Load and parse volume data from /etc/recovery.fstab. +void load_volume_table(); -/* Returns negative on error, positive if it's mounted, zero if it isn't. - */ -int is_root_path_mounted(const char *root_path); - -int ensure_root_path_mounted(const char *root_path); +// Return the Volume* record for this path (or NULL). +Volume* volume_for_path(const char* path); -int ensure_root_path_unmounted(const char *root_path); +// Make sure that the volume 'path' is on is mounted. Returns 0 on +// success (volume is mounted). +int ensure_path_mounted(const char* path); -const MtdPartition *get_root_mtd_partition(const char *root_path); +// Make sure that the volume 'path' is on is mounted. Returns 0 on +// success (volume is unmounted); +int ensure_path_unmounted(const char* path); -/* "root" must be the exact name of the root; no relative path is permitted. - * If the named root is mounted, this will attempt to unmount it first. - */ -int format_root_device(const char *root); +// 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); #endif // RECOVERY_ROOTS_H_ |