nicer libirecovery errors

This commit is contained in:
Nick Chan committed 2023-01-18 01:53:24 +08:00
1 parent 6ba3b1a29a
commit 71c1674e20
2 files changed
+5 -5

No files matched your search

+4 -4
View File
@@ -346,7 +346,7 @@ int recvinfo_cmd(recvinfo_t* info, const uint64_t ecid) {
irecv_client_t client = NULL;
irecv_error_t err = irecv_open_with_ecid(&client, ecid);
if (err != IRECV_E_SUCCESS) {
LOG(LOG_ERROR, "libirecovery error: %d\n", err);
LOG(LOG_ERROR, "libirecovery error: %d (%s)", err, irecv_strerror(err));
return -1;
}
int mode = 0;
@@ -356,7 +356,7 @@ int recvinfo_cmd(recvinfo_t* info, const uint64_t ecid) {
irecv_device_t device;
err = irecv_devices_get_device_by_client(client, &device);
if (err != IRECV_E_SUCCESS) {
LOG(LOG_ERROR, "libirecovery error: %d\n", err);
LOG(LOG_ERROR, "libirecovery error: %d (%s)", err, irecv_strerror(err));
return -1;
}
info->mode = mode;
@@ -378,7 +378,7 @@ int autoboot_cmd(const uint64_t ecid) {
irecv_close(client);
return 0;
} else {
LOG(LOG_ERROR, "libirecovery error: %d\n", err);
LOG(LOG_ERROR, "libirecovery error: %d (%s)", err, irecv_strerror(err));
return -1;
}
}
@@ -393,7 +393,7 @@ int exitrecv_cmd(const uint64_t ecid) {
irecv_close(client);
return 0;
} else {
LOG(LOG_ERROR, "libirecovery error: %d\n", err);
LOG(LOG_ERROR, "libirecovery error: %d (%s)", err, irecv_strerror(err));
return -1;
}
}
+1 -1
View File
@@ -90,7 +90,7 @@ void* connected_recovery_mode(struct irecv_device_info* info) {
LOG(LOG_WARNING, "Ignoring non-arm64 device...");
return NULL;
}
sleep(1);
ret = autoboot_cmd(info->ecid);
if (ret) {
LOG(LOG_ERROR, "Cannot set auto-boot back to true");