summaryrefslogtreecommitdiffstats
path: root/roots.c
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2010-09-17 22:30:15 +0200
committerAndroid Git Automerger <android-git-automerger@android.com>2010-09-17 22:30:15 +0200
commit40f0d3b4e06d915ef8f3ce0adb00eb0d6902b616 (patch)
tree1f5915af5ad0420295138e6d55dc95c094127d15 /roots.c
parentam 792b0071: do not merge - update to match ext4utils api (diff)
parentremove unneeded partition roots (diff)
downloadandroid_bootable_recovery-40f0d3b4e06d915ef8f3ce0adb00eb0d6902b616.tar
android_bootable_recovery-40f0d3b4e06d915ef8f3ce0adb00eb0d6902b616.tar.gz
android_bootable_recovery-40f0d3b4e06d915ef8f3ce0adb00eb0d6902b616.tar.bz2
android_bootable_recovery-40f0d3b4e06d915ef8f3ce0adb00eb0d6902b616.tar.lz
android_bootable_recovery-40f0d3b4e06d915ef8f3ce0adb00eb0d6902b616.tar.xz
android_bootable_recovery-40f0d3b4e06d915ef8f3ce0adb00eb0d6902b616.tar.zst
android_bootable_recovery-40f0d3b4e06d915ef8f3ce0adb00eb0d6902b616.zip
Diffstat (limited to 'roots.c')
-rw-r--r--roots.c55
1 files changed, 0 insertions, 55 deletions
diff --git a/roots.c b/roots.c
index d5754db3a..a510145e5 100644
--- a/roots.c
+++ b/roots.c
@@ -45,15 +45,10 @@ static const char g_package_file[] = "@\0g_package_file";
static const char g_ramdisk[] = "@\0g_ramdisk";
static RootInfo g_roots[] = {
- { "BOOT:", g_mtd_device, NULL, "boot", NULL, g_raw },
{ "CACHE:", g_mtd_device, NULL, "cache", "/cache", "yaffs2" },
{ "DATA:", g_mtd_device, NULL, "userdata", "/data", "yaffs2" },
{ "MISC:", g_mtd_device, NULL, "misc", NULL, g_raw },
- { "PACKAGE:", NULL, NULL, NULL, NULL, g_package_file },
- { "RECOVERY:", g_mtd_device, NULL, "recovery", "/", g_raw },
{ "SDCARD:", "/dev/block/mmcblk0p1", "/dev/block/mmcblk0", NULL, "/sdcard", "vfat" },
- { "SYSTEM:", g_mtd_device, NULL, "system", "/system", "yaffs2" },
- { "MBM:", g_mtd_device, NULL, "mbm", NULL, g_raw },
{ "TMP:", NULL, NULL, NULL, "/tmp", g_ramdisk },
};
#define NUM_ROOTS (sizeof(g_roots) / sizeof(g_roots[0]))
@@ -85,56 +80,6 @@ get_root_info_for_path(const char *root_path)
return NULL;
}
-static const ZipArchive *g_package = NULL;
-static char *g_package_path = NULL;
-
-int
-register_package_root(const ZipArchive *package, const char *package_path)
-{
- if (package != NULL) {
- package_path = strdup(package_path);
- if (package_path == NULL) {
- return -1;
- }
- g_package_path = (char *)package_path;
- } else {
- free(g_package_path);
- g_package_path = NULL;
- }
- g_package = package;
- return 0;
-}
-
-int
-is_package_root_path(const char *root_path)
-{
- const RootInfo *info = get_root_info_for_path(root_path);
- return info != NULL && info->filesystem == g_package_file;
-}
-
-const char *
-translate_package_root_path(const char *root_path,
- char *out_buf, size_t out_buf_len, const ZipArchive **out_package)
-{
- const RootInfo *info = get_root_info_for_path(root_path);
- if (info == NULL || info->filesystem != g_package_file) {
- return NULL;
- }
-
- /* Strip the package root off of the path.
- */
- size_t root_len = strlen(info->name);
- root_path += root_len;
- size_t root_path_len = strlen(root_path);
-
- if (out_buf_len < root_path_len + 1) {
- return NULL;
- }
- strcpy(out_buf, root_path);
- *out_package = g_package;
- return out_buf;
-}
-
/* 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.