mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-26 02:59:49 +01:00
fixes
This commit is contained in:
1 parent
8138d582ab
commit
2415d7d4ee
5 files changed
+3
-21
No files matched your search
@@ -4,7 +4,7 @@ STRIP = strip
|
|||||||
CC ?= cc
|
CC ?= cc
|
||||||
CFLAGS += -I$(DEP)/include -I$(SRC)/include -I$(SRC)
|
CFLAGS += -I$(DEP)/include -I$(SRC)/include -I$(SRC)
|
||||||
CFLAGS += -Wall -Wextra -DPALERAIN_VERSION=\"2.0.0\" -Wall -Wextra -Wno-unused-parameter
|
CFLAGS += -Wall -Wextra -DPALERAIN_VERSION=\"2.0.0\" -Wall -Wextra -Wno-unused-parameter
|
||||||
CFLAGS += -Wno-unused-variable -I$(SRC)/src -std=c99 -pedantic-errors -D_DARWIN_C_SOURCE -D_GNU_SOURCE
|
CFLAGS += -Wno-unused-variable -I$(SRC)/src -std=c99 -pedantic-errors -D_C99_SOURCE -D_POSIX_C_SOURCE=199506L
|
||||||
LIBS += $(DEP)/lib/libimobiledevice-1.0.a $(DEP)/lib/libirecovery-1.0.a $(DEP)/lib/libusbmuxd-2.0.a
|
LIBS += $(DEP)/lib/libimobiledevice-1.0.a $(DEP)/lib/libirecovery-1.0.a $(DEP)/lib/libusbmuxd-2.0.a
|
||||||
LIBS += $(DEP)/lib/libimobiledevice-glue-1.0.a $(DEP)/lib/libplist-2.0.a -pthread
|
LIBS += $(DEP)/lib/libimobiledevice-glue-1.0.a $(DEP)/lib/libplist-2.0.a -pthread
|
||||||
ifeq ($(TARGET_OS),)
|
ifeq ($(TARGET_OS),)
|
||||||
|
|||||||
@@ -91,9 +91,6 @@ void* connected_recovery_mode(struct irecv_device_info* info) {
|
|||||||
cpid = info->cpid;
|
cpid = info->cpid;
|
||||||
ecid = info->ecid;
|
ecid = info->ecid;
|
||||||
bdid = info->bdid;
|
bdid = info->bdid;
|
||||||
#if defined(__APPLE__) || defined(__linux__)
|
|
||||||
pthread_setname_np("in.palera.recovery-mode-handler");
|
|
||||||
#endif
|
|
||||||
if (!cpid_is_arm64(info->cpid)) {
|
if (!cpid_is_arm64(info->cpid)) {
|
||||||
LOG(LOG_WARNING, "Ignoring non-arm64 device...");
|
LOG(LOG_WARNING, "Ignoring non-arm64 device...");
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -142,9 +139,6 @@ void* connected_recovery_mode(struct irecv_device_info* info) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void* connected_dfu_mode(struct irecv_device_info* info) {
|
void* connected_dfu_mode(struct irecv_device_info* info) {
|
||||||
#if defined(__APPLE__) || defined(__linux__)
|
|
||||||
pthread_setname_np("in.palera.dfu-mode-handler");
|
|
||||||
#endif
|
|
||||||
if (get_ecid_wait_for_dfu() == info->ecid) {
|
if (get_ecid_wait_for_dfu() == info->ecid) {
|
||||||
set_ecid_wait_for_dfu(0);
|
set_ecid_wait_for_dfu(0);
|
||||||
puts("");
|
puts("");
|
||||||
@@ -190,9 +184,6 @@ void irecv_device_event_cb(const irecv_device_event_t *event, void* userdata) {
|
|||||||
|
|
||||||
void *dfuhelper(void* ptr) {
|
void *dfuhelper(void* ptr) {
|
||||||
dfuhelper_thr_running = true;
|
dfuhelper_thr_running = true;
|
||||||
#if defined(__APPLE__) || defined(__linux__)
|
|
||||||
pthread_setname_np("in.palera.dfu-helper");
|
|
||||||
#endif
|
|
||||||
subscribe_cmd(device_event_cb, irecv_device_event_cb);
|
subscribe_cmd(device_event_cb, irecv_device_event_cb);
|
||||||
set_spin(1);
|
set_spin(1);
|
||||||
while (get_spin()) {
|
while (get_spin()) {
|
||||||
|
|||||||
+1
-4
@@ -66,7 +66,7 @@ int build_checks() {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (c1_header->cputype != _mh_execute_header.cputype) {
|
if (c1_header->cputype != _mh_execute_header.cputype) {
|
||||||
LOG(LOG_FATAL, "Broken build: checkra1n CPU type is not the same as %s CPU type", getprogname());
|
LOG(LOG_FATAL, "Broken build: checkra1n CPU type does not match palera1n CPU type");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -91,9 +91,6 @@ bool use_tui = false, tui_started = false;
|
|||||||
|
|
||||||
int palera1n(int argc, char *argv[]) {
|
int palera1n(int argc, char *argv[]) {
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
#if defined(__APPLE__) || defined(__linux__)
|
|
||||||
pthread_setname_np("in.palera.main-thread");
|
|
||||||
#endif
|
|
||||||
pthread_mutex_init(&log_mutex, NULL);
|
pthread_mutex_init(&log_mutex, NULL);
|
||||||
pthread_mutex_init(&spin_mutex, NULL);
|
pthread_mutex_init(&spin_mutex, NULL);
|
||||||
pthread_mutex_init(&found_pongo_mutex, NULL);
|
pthread_mutex_init(&found_pongo_mutex, NULL);
|
||||||
|
|||||||
+1
-1
@@ -31,7 +31,7 @@ int override_file(override_file_t *finfo, niarelap_file_t** orig, unsigned int *
|
|||||||
return errno;
|
return errno;
|
||||||
}
|
}
|
||||||
LOG(LOG_VERBOSE5, "override_file: fstat fd %d succeeded!", fd);
|
LOG(LOG_VERBOSE5, "override_file: fstat fd %d succeeded!", fd);
|
||||||
void *addr = mmap(NULL, st.st_size, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0);
|
void *addr = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
|
||||||
if (addr == MAP_FAILED) {
|
if (addr == MAP_FAILED) {
|
||||||
LOG(LOG_ERROR, "Failed to map file %s: %d (%s)", filename, errno, strerror(errno));
|
LOG(LOG_ERROR, "Failed to map file %s: %d (%s)", filename, errno, strerror(errno));
|
||||||
return errno;
|
return errno;
|
||||||
|
|||||||
@@ -18,9 +18,6 @@ int pongo_thr_running = 0;
|
|||||||
void* pongo_helper(void* ptr) {
|
void* pongo_helper(void* ptr) {
|
||||||
pongo_thr_running = 1;
|
pongo_thr_running = 1;
|
||||||
pthread_cleanup_push(thr_cleanup, &pongo_thr_running);
|
pthread_cleanup_push(thr_cleanup, &pongo_thr_running);
|
||||||
#if defined(__APPLE__) || defined(__linux__)
|
|
||||||
pthread_setname_np("in.palera.pongo-helper");
|
|
||||||
#endif
|
|
||||||
wait_for_pongo();
|
wait_for_pongo();
|
||||||
while (get_spin()) {
|
while (get_spin()) {
|
||||||
sleep(1);
|
sleep(1);
|
||||||
@@ -33,9 +30,6 @@ void *pongo_usb_callback(void *arg) {
|
|||||||
if (get_found_pongo())
|
if (get_found_pongo())
|
||||||
return NULL;
|
return NULL;
|
||||||
set_found_pongo(1);
|
set_found_pongo(1);
|
||||||
#if defined(__APPLE__) || defined(__linux__)
|
|
||||||
pthread_setname_np("in.palera.pongo-handler");
|
|
||||||
#endif
|
|
||||||
strncat(xargs_cmd, " rootdev=md0", 0x270 - strlen(xargs_cmd) - 1);
|
strncat(xargs_cmd, " rootdev=md0", 0x270 - strlen(xargs_cmd) - 1);
|
||||||
if (checkrain_option_enabled(palerain_flags, palerain_option_setup_rootful)) {
|
if (checkrain_option_enabled(palerain_flags, palerain_option_setup_rootful)) {
|
||||||
strncat(xargs_cmd, " wdt=-1", 0x270 - strlen(xargs_cmd) - 1);
|
strncat(xargs_cmd, " wdt=-1", 0x270 - strlen(xargs_cmd) - 1);
|
||||||
|
|||||||
Reference in new issue
Block a user