Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cb4645d7 authored by Danesh M's avatar Danesh M Committed by Steve Kondik
Browse files

libcutils : reboot mount fix

On aries for eg, cache needs to be rw for the RECOVERY_PRE_COMMAND to
work because we write to /cache/.startrecovery

This patchset moves the RECOVERY_PRE_COMMAND prior to the remount.

Change-Id: Iab1da9a15e64e8831b04e4eb21d824de5f8bd0eb
parent cedf0295
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -105,6 +105,13 @@ int android_reboot(int cmd, int flags, char *arg)
{
    int ret;

#ifdef RECOVERY_PRE_COMMAND
    if (cmd == ANDROID_RB_RESTART2) {
        if (!strncmp((char *)arg,"recovery",8))
            system( RECOVERY_PRE_COMMAND );
    }
#endif

    if (!(flags & ANDROID_RB_FLAG_NO_SYNC))
        sync();

@@ -121,10 +128,6 @@ int android_reboot(int cmd, int flags, char *arg)
            break;

        case ANDROID_RB_RESTART2:
#ifdef RECOVERY_PRE_COMMAND
            if (!strncmp((char *)arg,"recovery",8))
                system( RECOVERY_PRE_COMMAND );
#endif
            ret = __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2,
                           LINUX_REBOOT_CMD_RESTART2, arg);
            break;