This commit is contained in:
Nick Chan committed 2023-02-07 16:43:33 +08:00
1 parent 8138d582ab
commit 2415d7d4ee
5 files changed
+3 -21

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@ STRIP = strip
CC ?= cc
CFLAGS += -I$(DEP)/include -I$(SRC)/include -I$(SRC)
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-glue-1.0.a $(DEP)/lib/libplist-2.0.a -pthread
ifeq ($(TARGET_OS),)
-9
View File
@@ -91,9 +91,6 @@ void* connected_recovery_mode(struct irecv_device_info* info) {
cpid = info->cpid;
ecid = info->ecid;
bdid = info->bdid;
#if defined(__APPLE__) || defined(__linux__)
pthread_setname_np("in.palera.recovery-mode-handler");
#endif
if (!cpid_is_arm64(info->cpid)) {
LOG(LOG_WARNING, "Ignoring non-arm64 device...");
return NULL;
@@ -142,9 +139,6 @@ void* connected_recovery_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) {
set_ecid_wait_for_dfu(0);
puts("");
@@ -190,9 +184,6 @@ void irecv_device_event_cb(const irecv_device_event_t *event, void* userdata) {
void *dfuhelper(void* ptr) {
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);
set_spin(1);
while (get_spin()) {
+1 -4
View File
@@ -66,7 +66,7 @@ int build_checks() {
return -1;
}
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;
}
#endif
@@ -91,9 +91,6 @@ bool use_tui = false, tui_started = false;
int palera1n(int argc, char *argv[]) {
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(&spin_mutex, NULL);
pthread_mutex_init(&found_pongo_mutex, NULL);
+1 -1
View File
@@ -31,7 +31,7 @@ int override_file(override_file_t *finfo, niarelap_file_t** orig, unsigned int *
return errno;
}
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) {
LOG(LOG_ERROR, "Failed to map file %s: %d (%s)", filename, errno, strerror(errno));
return errno;
-6
View File
@@ -18,9 +18,6 @@ int pongo_thr_running = 0;
void* pongo_helper(void* ptr) {
pongo_thr_running = 1;
pthread_cleanup_push(thr_cleanup, &pongo_thr_running);
#if defined(__APPLE__) || defined(__linux__)
pthread_setname_np("in.palera.pongo-helper");
#endif
wait_for_pongo();
while (get_spin()) {
sleep(1);
@@ -33,9 +30,6 @@ void *pongo_usb_callback(void *arg) {
if (get_found_pongo())
return NULL;
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);
if (checkrain_option_enabled(palerain_flags, palerain_option_setup_rootful)) {
strncat(xargs_cmd, " wdt=-1", 0x270 - strlen(xargs_cmd) - 1);