int map_path_user(char *oldpath, char *newpath, uint32_t flags) { char *oldp, *newp; #ifdef DEBUG DPRINTF("map_path_user, called by process %s: %s -> %s\n", get_process_name(get_current_process_critical()), oldpath, newpath); #endif if (oldpath == 0) return -1; int ret = pathdup_from_user(get_secure_user_ptr(oldpath), &oldp); if (ret != 0) return ret; if (newpath == 0) newp = NULL; else { ret = pathdup_from_user(get_secure_user_ptr(newpath), &newp); if (ret != 0) { dealloc(oldp, 0x27); return ret; } } ret = map_path(oldp, newp, flags | FLAG_COPY); dealloc(oldp, 0x27); if (newp) dealloc(newp, 0x27); return ret; }
{ fake_region = bd_video_region_map[i].ps3_region; } } if (fake_region != 0) *region = fake_region; } LV2_HOOKED_FUNCTION_PRECALL_SUCCESS_2(int, region_func, (uint64_t func, uint8_t *buf)) { if (func == 0x19004) { //DPRINTF("We are originally in region %02X\n", buf[3]); char *procname = get_process_name(get_current_process_critical()); if (procname) { if (strcmp(procname+8, "_main_bdp_BDVD.self") == 0) { if (dvd_video_region != 0) { set_dvd_video_region(&buf[3]); } } else if (strcmp(procname+8, "_main_bdp_BDMV.self") == 0) { if (bd_video_region != 0) { set_bd_video_region(&buf[3]); }