handle mounts in recovery if the have only one argument
controlled by BOARD_RECOVERY_HANDLES_MOUNT if it is not set the recovery will behave like before. this allows the recovery to handle commands like 'mount system' it is needed for devices with two different filesystem in recovery.fstab like RFS and EXT4 cause the regular recovery behaviour will only generate a fstab for mounts of fstype2 and ignore the other fstype. This will also enable things like run_program("/sbin/busybox", "mount", "/system"); on those system. Change-Id: Ib10ffc7735a2edb8dd32be230ba885d5d2744f73
This commit is contained in:
parent
5e922a4bf4
commit
6afbcdc651
@ -38,7 +38,7 @@ LOCAL_CFLAGS += -DRECOVERY_VERSION="$(RECOVERY_VERSION)"
|
||||
RECOVERY_API_VERSION := 2
|
||||
LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)
|
||||
|
||||
BOARD_RECOVERY_DEFINES := BOARD_HAS_NO_SELECT_BUTTON BOARD_HAS_SMALL_RECOVERY BOARD_LDPI_RECOVERY BOARD_UMS_LUNFILE BOARD_RECOVERY_ALWAYS_WIPES
|
||||
BOARD_RECOVERY_DEFINES := BOARD_HAS_NO_SELECT_BUTTON BOARD_HAS_SMALL_RECOVERY BOARD_LDPI_RECOVERY BOARD_UMS_LUNFILE BOARD_RECOVERY_ALWAYS_WIPES BOARD_RECOVERY_HANDLES_MOUNT
|
||||
|
||||
$(foreach board_define,$(BOARD_RECOVERY_DEFINES), \
|
||||
$(if $($(board_define)), \
|
||||
|
@ -787,6 +787,13 @@ main(int argc, char **argv) {
|
||||
return nandroid_main(argc, argv);
|
||||
if (strstr(argv[0], "reboot"))
|
||||
return reboot_main(argc, argv);
|
||||
#ifdef BOARD_RECOVERY_HANDLES_MOUNT
|
||||
if (strstr(argv[0], "mount") && argc == 2 && !strstr(argv[0], "umount"))
|
||||
{
|
||||
load_volume_table();
|
||||
return ensure_path_mounted(argv[1]);
|
||||
}
|
||||
#endif
|
||||
if (strstr(argv[0], "poweroff")){
|
||||
return reboot_main(argc, argv);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user