summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2013-09-26 22:44:54 +0200
committerGravatar Martin Szulecki2013-09-26 22:44:54 +0200
commitfc74c3e181fd5a279b960b6ecea73f04e075a2fc (patch)
tree6e746b2495f039dbfbbef3a24dfb82961745cddf /src
parent5877a05844fc3bd224dec206c54fe6633c671455 (diff)
downloadlibirecovery-fc74c3e181fd5a279b960b6ecea73f04e075a2fc.tar.gz
libirecovery-fc74c3e181fd5a279b960b6ecea73f04e075a2fc.tar.bz2
Add irecv_reboot() command helper which reboots the device
Diffstat (limited to 'src')
-rw-r--r--src/libirecovery.c8
1 files changed, 8 insertions, 0 deletions
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: