mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-23 18:49:48 +02:00
turn into valid c99
This commit is contained in:
1 parent
a6f8181211
commit
907ac98c9c
10 files changed
+76
-71
No files matched your search
+2
-2
@@ -36,7 +36,7 @@ int dfuhelper_thr_running = false;
|
||||
|
||||
void step(int time, int time2, char *text, bool (*cond)(uint64_t), uint64_t cond_arg) {
|
||||
for (int i = time2; i < time; i++) {
|
||||
printf(CYN "\r\e[K%s (%d)" CRESET, text, time - i + time2);
|
||||
printf(CYN "\r\033[K%s (%d)" CRESET, text, time - i + time2);
|
||||
fflush(stdout);
|
||||
sleep(1);
|
||||
if (cond != NULL && cond(cond_arg)) pthread_exit(NULL);
|
||||
@@ -119,7 +119,7 @@ void* connected_recovery_mode(struct irecv_device_info* info) {
|
||||
set_ecid_wait_for_dfu(0);
|
||||
return NULL;
|
||||
}
|
||||
printf("\r\e[K");
|
||||
printf("\r\033[K");
|
||||
bool nohome = NOHOME;
|
||||
if (nohome)
|
||||
step(2, 0, "Hold volume down + side button", NULL, 0);
|
||||
|
||||
@@ -93,4 +93,4 @@ int p1_log(log_level_t loglevel, const char *fname, int lineno, const char *fxna
|
||||
}
|
||||
pthread_mutex_unlock(&log_mutex);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
+3
-2
@@ -1,3 +1,5 @@
|
||||
#include <palerain.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
@@ -12,7 +14,6 @@
|
||||
#include <sys/mman.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <palerain.h>
|
||||
|
||||
int override_file(override_file_t *finfo, niarelap_file_t** orig, unsigned int *orig_len, char *filename) {
|
||||
int ret = 0;
|
||||
@@ -46,4 +47,4 @@ int override_file(override_file_t *finfo, niarelap_file_t** orig, unsigned int *
|
||||
*orig_len = (unsigned int)st.st_size;
|
||||
LOG(LOG_VERBOSE5, "override_file() finished!");
|
||||
return 0;
|
||||
};
|
||||
}
|
||||
+1
-1
@@ -70,4 +70,4 @@ done:
|
||||
device_has_booted = true;
|
||||
set_spin(0);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -196,7 +196,7 @@ static int LostDevice(libusb_context *ctx, libusb_device *dev, libusb_hotplug_ev
|
||||
|
||||
int wait_for_pongo(void)
|
||||
{
|
||||
stuff_t stuff = {};
|
||||
stuff_t stuff;
|
||||
libusb_hotplug_callback_handle hp[2];
|
||||
|
||||
int r = libusb_init(NULL);
|
||||
@@ -240,7 +240,7 @@ int wait_for_pongo(void)
|
||||
|
||||
for(ssize_t i = 0; i < sz; ++i)
|
||||
{
|
||||
struct libusb_device_descriptor desc = {};
|
||||
struct libusb_device_descriptor desc;
|
||||
r = libusb_get_device_descriptor(list[i], &desc);
|
||||
if(r != LIBUSB_SUCCESS)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user