diff options
-rw-r--r-- | include/libirecovery.h | 1 | ||||
-rw-r--r-- | src/libirecovery.c | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/libirecovery.h b/include/libirecovery.h index efa6ff2..091c29b 100644 --- a/include/libirecovery.h +++ b/include/libirecovery.h @@ -223,6 +223,7 @@ irecv_error_t irecv_getret(irecv_client_t client, unsigned int* value); irecv_error_t irecv_getenv(irecv_client_t client, const char* variable, char** value); irecv_error_t irecv_setenv(irecv_client_t client, const char* variable, const char* value); irecv_error_t irecv_set_interface(irecv_client_t client, int interface, int alt_interface); +irecv_error_t irecv_reboot(irecv_client_t client); irecv_error_t irecv_get_cpid(irecv_client_t client, unsigned int* cpid); irecv_error_t irecv_get_bdid(irecv_client_t client, unsigned int* bdid); irecv_error_t irecv_get_ecid(irecv_client_t client, unsigned long long* ecid); 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: |