From fc74c3e181fd5a279b960b6ecea73f04e075a2fc Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Thu, 26 Sep 2013 22:44:54 +0200 Subject: Add irecv_reboot() command helper which reboots the device --- src/libirecovery.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/libirecovery.c b/src/libirecovery.c index f51ca3d..63bfecf 100644 --- a/src/libirecovery.c +++ b/src/libirecovery.c @@ -1322,6 +1322,14 @@ irecv_error_t irecv_setenv(irecv_client_t client, const char* variable, const ch return IRECV_E_SUCCESS; } +irecv_error_t irecv_reboot(irecv_client_t client) { + irecv_error_t error = irecv_send_command_raw(client, "reboot"); + if(error != IRECV_E_SUCCESS) { + return error; + } + return IRECV_E_SUCCESS; +} + const char* irecv_strerror(irecv_error_t error) { switch (error) { case IRECV_E_SUCCESS: -- cgit v1.1-32-gdbae