diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-03-26 22:48:22 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-03-26 22:48:22 +0100 |
| commit | a7119cae7691cbf1ac75d2ab849e3bb89dca79ba (patch) | |
| tree | cfe3281fb775b4d06de51e3cefbf0dce3889b255 /src | |
| parent | c33368bfb49f0391cbb9fa31f93197030a4f175a (diff) | |
| download | box64-a7119cae7691cbf1ac75d2ab849e3bb89dca79ba.tar.gz box64-a7119cae7691cbf1ac75d2ab849e3bb89dca79ba.zip | |
Added wrapped libudev0 and libudev1
Diffstat (limited to 'src')
| -rwxr-xr-x | src/library_list.h | 4 | ||||
| -rw-r--r-- | src/wrapped/generated/functions_list.txt | 3 | ||||
| -rw-r--r-- | src/wrapped/generated/wrapper.c | 6 | ||||
| -rw-r--r-- | src/wrapped/generated/wrapper.h | 3 | ||||
| -rwxr-xr-x | src/wrapped/wrappedudev0.c | 20 | ||||
| -rwxr-xr-x | src/wrapped/wrappedudev0_private.h | 82 | ||||
| -rwxr-xr-x | src/wrapped/wrappedudev1.c | 20 | ||||
| -rwxr-xr-x | src/wrapped/wrappedudev1_private.h | 82 |
8 files changed, 218 insertions, 2 deletions
diff --git a/src/library_list.h b/src/library_list.h index aa559bb1..5096672e 100755 --- a/src/library_list.h +++ b/src/library_list.h @@ -71,8 +71,8 @@ GO("libalure.so.1", alure) //GO("libturbojpeg.so.0", turbojpeg) //GO("libcurl.so.4", curl) //GO("libcurl-gnutls.so.4", curl) -//GO("libudev.so.0", udev0) -//GO("libudev.so.1", udev1) +GO("libudev.so.0", udev0) +GO("libudev.so.1", udev1) GO("libdbus-1.so.3", dbus) //GO("libiconv.so.2", iconv) //GO("libdrm.so.2", libdrm) diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt index a0cd077a..74c88e76 100644 --- a/src/wrapped/generated/functions_list.txt +++ b/src/wrapped/generated/functions_list.txt @@ -104,6 +104,7 @@ #() iFpI #() iFpC #() iFpu +#() iFpU #() iFpf #() iFpd #() iFpl @@ -252,6 +253,7 @@ #() iFpuU #() iFpuL #() iFpup +#() iFpUU #() iFpfu #() iFpff #() iFpli @@ -331,6 +333,7 @@ #() pFpiL #() pFpip #() pFpCC +#() pFpCu #() pFpui #() pFpuu #() pFpuL diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c index f54215dc..1989b4d0 100644 --- a/src/wrapped/generated/wrapper.c +++ b/src/wrapped/generated/wrapper.c @@ -137,6 +137,7 @@ typedef int32_t (*iFpi_t)(void*, int32_t); typedef int32_t (*iFpI_t)(void*, int64_t); typedef int32_t (*iFpC_t)(void*, uint8_t); typedef int32_t (*iFpu_t)(void*, uint32_t); +typedef int32_t (*iFpU_t)(void*, uint64_t); typedef int32_t (*iFpf_t)(void*, float); typedef int32_t (*iFpd_t)(void*, double); typedef int32_t (*iFpl_t)(void*, intptr_t); @@ -285,6 +286,7 @@ typedef int32_t (*iFpuu_t)(void*, uint32_t, uint32_t); typedef int32_t (*iFpuU_t)(void*, uint32_t, uint64_t); typedef int32_t (*iFpuL_t)(void*, uint32_t, uintptr_t); typedef int32_t (*iFpup_t)(void*, uint32_t, void*); +typedef int32_t (*iFpUU_t)(void*, uint64_t, uint64_t); typedef int32_t (*iFpfu_t)(void*, float, uint32_t); typedef int32_t (*iFpff_t)(void*, float, float); typedef int32_t (*iFpli_t)(void*, intptr_t, int32_t); @@ -364,6 +366,7 @@ typedef void* (*pFpiu_t)(void*, int32_t, uint32_t); typedef void* (*pFpiL_t)(void*, int32_t, uintptr_t); typedef void* (*pFpip_t)(void*, int32_t, void*); typedef void* (*pFpCC_t)(void*, uint8_t, uint8_t); +typedef void* (*pFpCu_t)(void*, uint8_t, uint32_t); typedef void* (*pFpui_t)(void*, uint32_t, int32_t); typedef void* (*pFpuu_t)(void*, uint32_t, uint32_t); typedef void* (*pFpuL_t)(void*, uint32_t, uintptr_t); @@ -1214,6 +1217,7 @@ void iFpi(x64emu_t *emu, uintptr_t fcn) { iFpi_t fn = (iFpi_t)fcn; R_RAX=fn((voi void iFpI(x64emu_t *emu, uintptr_t fcn) { iFpI_t fn = (iFpI_t)fcn; R_RAX=fn((void*)R_RDI, (int64_t)R_RSI); } void iFpC(x64emu_t *emu, uintptr_t fcn) { iFpC_t fn = (iFpC_t)fcn; R_RAX=fn((void*)R_RDI, (uint8_t)R_RSI); } void iFpu(x64emu_t *emu, uintptr_t fcn) { iFpu_t fn = (iFpu_t)fcn; R_RAX=fn((void*)R_RDI, (uint32_t)R_RSI); } +void iFpU(x64emu_t *emu, uintptr_t fcn) { iFpU_t fn = (iFpU_t)fcn; R_RAX=fn((void*)R_RDI, (uint64_t)R_RSI); } void iFpf(x64emu_t *emu, uintptr_t fcn) { iFpf_t fn = (iFpf_t)fcn; R_RAX=fn((void*)R_RDI, emu->xmm[0].f[0]); } void iFpd(x64emu_t *emu, uintptr_t fcn) { iFpd_t fn = (iFpd_t)fcn; R_RAX=fn((void*)R_RDI, emu->xmm[0].d[0]); } void iFpl(x64emu_t *emu, uintptr_t fcn) { iFpl_t fn = (iFpl_t)fcn; R_RAX=fn((void*)R_RDI, (intptr_t)R_RSI); } @@ -1362,6 +1366,7 @@ void iFpuu(x64emu_t *emu, uintptr_t fcn) { iFpuu_t fn = (iFpuu_t)fcn; R_RAX=fn(( void iFpuU(x64emu_t *emu, uintptr_t fcn) { iFpuU_t fn = (iFpuU_t)fcn; R_RAX=fn((void*)R_RDI, (uint32_t)R_RSI, (uint64_t)R_RDX); } void iFpuL(x64emu_t *emu, uintptr_t fcn) { iFpuL_t fn = (iFpuL_t)fcn; R_RAX=fn((void*)R_RDI, (uint32_t)R_RSI, (uintptr_t)R_RDX); } void iFpup(x64emu_t *emu, uintptr_t fcn) { iFpup_t fn = (iFpup_t)fcn; R_RAX=fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX); } +void iFpUU(x64emu_t *emu, uintptr_t fcn) { iFpUU_t fn = (iFpUU_t)fcn; R_RAX=fn((void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX); } void iFpfu(x64emu_t *emu, uintptr_t fcn) { iFpfu_t fn = (iFpfu_t)fcn; R_RAX=fn((void*)R_RDI, emu->xmm[0].f[0], (uint32_t)R_RSI); } void iFpff(x64emu_t *emu, uintptr_t fcn) { iFpff_t fn = (iFpff_t)fcn; R_RAX=fn((void*)R_RDI, emu->xmm[0].f[0], emu->xmm[1].f[0]); } void iFpli(x64emu_t *emu, uintptr_t fcn) { iFpli_t fn = (iFpli_t)fcn; R_RAX=fn((void*)R_RDI, (intptr_t)R_RSI, (int32_t)R_RDX); } @@ -1441,6 +1446,7 @@ void pFpiu(x64emu_t *emu, uintptr_t fcn) { pFpiu_t fn = (pFpiu_t)fcn; R_RAX=(uin void pFpiL(x64emu_t *emu, uintptr_t fcn) { pFpiL_t fn = (pFpiL_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (int32_t)R_RSI, (uintptr_t)R_RDX); } void pFpip(x64emu_t *emu, uintptr_t fcn) { pFpip_t fn = (pFpip_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX); } void pFpCC(x64emu_t *emu, uintptr_t fcn) { pFpCC_t fn = (pFpCC_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint8_t)R_RSI, (uint8_t)R_RDX); } +void pFpCu(x64emu_t *emu, uintptr_t fcn) { pFpCu_t fn = (pFpCu_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint8_t)R_RSI, (uint32_t)R_RDX); } void pFpui(x64emu_t *emu, uintptr_t fcn) { pFpui_t fn = (pFpui_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint32_t)R_RSI, (int32_t)R_RDX); } void pFpuu(x64emu_t *emu, uintptr_t fcn) { pFpuu_t fn = (pFpuu_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX); } void pFpuL(x64emu_t *emu, uintptr_t fcn) { pFpuL_t fn = (pFpuL_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uintptr_t)R_RDX); } diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h index 246d949a..405e8085 100644 --- a/src/wrapped/generated/wrapper.h +++ b/src/wrapped/generated/wrapper.h @@ -134,6 +134,7 @@ void iFpi(x64emu_t *emu, uintptr_t fnc); void iFpI(x64emu_t *emu, uintptr_t fnc); void iFpC(x64emu_t *emu, uintptr_t fnc); void iFpu(x64emu_t *emu, uintptr_t fnc); +void iFpU(x64emu_t *emu, uintptr_t fnc); void iFpf(x64emu_t *emu, uintptr_t fnc); void iFpd(x64emu_t *emu, uintptr_t fnc); void iFpl(x64emu_t *emu, uintptr_t fnc); @@ -282,6 +283,7 @@ void iFpuu(x64emu_t *emu, uintptr_t fnc); void iFpuU(x64emu_t *emu, uintptr_t fnc); void iFpuL(x64emu_t *emu, uintptr_t fnc); void iFpup(x64emu_t *emu, uintptr_t fnc); +void iFpUU(x64emu_t *emu, uintptr_t fnc); void iFpfu(x64emu_t *emu, uintptr_t fnc); void iFpff(x64emu_t *emu, uintptr_t fnc); void iFpli(x64emu_t *emu, uintptr_t fnc); @@ -361,6 +363,7 @@ void pFpiu(x64emu_t *emu, uintptr_t fnc); void pFpiL(x64emu_t *emu, uintptr_t fnc); void pFpip(x64emu_t *emu, uintptr_t fnc); void pFpCC(x64emu_t *emu, uintptr_t fnc); +void pFpCu(x64emu_t *emu, uintptr_t fnc); void pFpui(x64emu_t *emu, uintptr_t fnc); void pFpuu(x64emu_t *emu, uintptr_t fnc); void pFpuL(x64emu_t *emu, uintptr_t fnc); diff --git a/src/wrapped/wrappedudev0.c b/src/wrapped/wrappedudev0.c new file mode 100755 index 00000000..284ea202 --- /dev/null +++ b/src/wrapped/wrappedudev0.c @@ -0,0 +1,20 @@ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#define _GNU_SOURCE /* See feature_test_macros(7) */ +#include <dlfcn.h> + +#include "wrappedlibs.h" + +#include "wrapper.h" +#include "bridge.h" +#include "librarian/library_private.h" +#include "x64emu.h" + +const char* udev0Name = "libudev.so.0"; +#define LIBNAME udev0 +// fallback to 1 version... Not sure if really correct (probably not) +#define ALTNAME "libudev.so.1" + +#include "wrappedlib_init.h" + diff --git a/src/wrapped/wrappedudev0_private.h b/src/wrapped/wrappedudev0_private.h new file mode 100755 index 00000000..2026fb7a --- /dev/null +++ b/src/wrapped/wrappedudev0_private.h @@ -0,0 +1,82 @@ +#if !(defined(GO) && defined(GOM) && defined(GO2) && defined(DATA)) +#error Meh.... +#endif + +GO(udev_device_ref, pFp) +GO(udev_device_unref, vFp) +GO(udev_device_get_udev, pFp) +GO(udev_device_new_from_syspath, pFpp) +GO(udev_device_new_from_devnum, pFpCu) +GO(udev_device_new_from_subsystem_sysname, pFppp) +GO(udev_device_new_from_environment, pFp) +GO(udev_device_get_parent, pFp) +GO(udev_device_get_parent_with_subsystem_devtype, pFppp) +GO(udev_device_get_devpath, pFp) +GO(udev_device_get_subsystem, pFp) +GO(udev_device_get_devtype, pFp) +GO(udev_device_get_syspath, pFp) +GO(udev_device_get_sysname, pFp) +GO(udev_device_get_sysnum, pFp) +GO(udev_device_get_devnode, pFp) +GO(udev_device_get_is_initialized, iFp) +GO(udev_device_get_devlinks_list_entry, pFp) +GO(udev_device_get_properties_list_entry, pFp) +GO(udev_device_get_tags_list_entry, pFp) +GO(udev_device_get_property_value, pFpp) +GO(udev_device_get_driver, pFp) +GO(udev_device_get_devnum, uFp) +GO(udev_device_get_action, pFp) +GO(udev_device_get_sysattr_value, pFpp) +GO(udev_device_get_sysattr_list_entry, pFp) +GO(dev_device_get_seqnum, UFp) +GO(dev_device_get_usec_since_initialized, UFp) +GO(udev_device_has_tag, iFpp) +GO(udev_enumerate_ref, pFp) +GO(udev_enumerate_unref, vFp) +GO(udev_enumerate_get_udev, pFp) +GO(udev_enumerate_new, pFp) +GO(udev_enumerate_add_match_subsystem, iFpp) +GO(udev_enumerate_add_nomatch_subsystem, iFpp) +GO(udev_enumerate_add_match_sysattr, iFppp) +GO(udev_enumerate_add_nomatch_sysattr, iFppp) +GO(udev_enumerate_add_match_property, iFppp) +GO(udev_enumerate_add_match_tag, iFpp) +GO(udev_enumerate_add_match_parent, iFpp) +GO(udev_enumerate_add_match_is_initialized, iFp) +GO(udev_enumerate_add_match_sysname, iFpp) +GO(udev_enumerate_add_syspath, iFpp) +GO(udev_enumerate_scan_devices, iFp) +GO(udev_enumerate_scan_subsystems, iFp) +GO(udev_enumerate_get_list_entry, pFp) +GO(udev_list_entry_get_next, pFp) +GO(udev_list_entry_get_by_name, pFpp) +GO(udev_list_entry_get_name, pFp) +GO(udev_list_entry_get_value, pFp) +GO(udev_monitor_ref, pFp) +GO(udev_monitor_unref, pFp) +GO(udev_monitor_get_udev, pFp) +GO(udev_monitor_new_from_netlink, pFpp) +GO(udev_monitor_new_from_socket, pFpp) +GO(udev_monitor_enable_receiving, iFp) +GO(udev_monitor_set_receive_buffer_size, iFpi) +GO(udev_monitor_get_fd, iFp) +GO(udev_monitor_receive_device, pFp) +GO(udev_monitor_filter_add_match_subsystem_devtype, iFppp) +GO(udev_monitor_filter_add_match_tag, iFpp) +GO(udev_monitor_filter_update, iFp) +GO(udev_monitor_filter_remove, iFp) +GO(udev_new, pFv) +GO(udev_ref, pFp) +GO(udev_unref, pFp) +GO(udev_queue_ref, pFp) +GO(udev_queue_unref, vFp) +GO(udev_queue_get_udev, pFp) +GO(udev_queue_new, pFp) +GO(udev_queue_get_kernel_seqnum, UFp) +GO(udev_queue_get_udev_seqnum, UFp) +GO(udev_queue_get_udev_is_active, iFp) +GO(udev_queue_get_queue_is_empty, iFp) +GO(udev_queue_get_seqnum_is_finished, iFpU) +GO(udev_queue_get_seqnum_sequence_is_finished, iFpUU) +GO(udev_queue_get_queued_list_entry, pFp) +GO(udev_queue_get_failed_list_entry, pFp) diff --git a/src/wrapped/wrappedudev1.c b/src/wrapped/wrappedudev1.c new file mode 100755 index 00000000..d485214d --- /dev/null +++ b/src/wrapped/wrappedudev1.c @@ -0,0 +1,20 @@ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#define _GNU_SOURCE /* See feature_test_macros(7) */ +#include <dlfcn.h> + +#include "wrappedlibs.h" + +#include "wrapper.h" +#include "bridge.h" +#include "librarian/library_private.h" +#include "x64emu.h" + +const char* udev1Name = "libudev.so.1"; +#define LIBNAME udev1 +// fallback to 0 version... Not sure if really correct (probably not) +#define ALTNAME "libudev.so.0" + +#include "wrappedlib_init.h" + diff --git a/src/wrapped/wrappedudev1_private.h b/src/wrapped/wrappedudev1_private.h new file mode 100755 index 00000000..f7644e36 --- /dev/null +++ b/src/wrapped/wrappedudev1_private.h @@ -0,0 +1,82 @@ +#if !(defined(GO) && defined(GOM) && defined(GO2) && defined(DATA)) +#error Meh.... +#endif + +GO(udev_device_ref, pFp) +GO(udev_device_unref, pFp) +GO(udev_device_get_udev, pFp) +GO(udev_device_new_from_syspath, pFpp) +GO(udev_device_new_from_devnum, pFpCu) +GO(udev_device_new_from_subsystem_sysname, pFppp) +GO(udev_device_new_from_environment, pFp) +GO(udev_device_get_parent, pFp) +GO(udev_device_get_parent_with_subsystem_devtype, pFppp) +GO(udev_device_get_devpath, pFp) +GO(udev_device_get_subsystem, pFp) +GO(udev_device_get_devtype, pFp) +GO(udev_device_get_syspath, pFp) +GO(udev_device_get_sysname, pFp) +GO(udev_device_get_sysnum, pFp) +GO(udev_device_get_devnode, pFp) +GO(udev_device_get_is_initialized, iFp) +GO(udev_device_get_devlinks_list_entry, pFp) +GO(udev_device_get_properties_list_entry, pFp) +GO(udev_device_get_tags_list_entry, pFp) +GO(udev_device_get_property_value, pFpp) +GO(udev_device_get_driver, pFp) +GO(udev_device_get_devnum, uFp) +GO(udev_device_get_action, pFp) +GO(udev_device_get_sysattr_value, pFpp) +GO(udev_device_get_sysattr_list_entry, pFp) +GO(dev_device_get_seqnum, UFp) +GO(dev_device_get_usec_since_initialized, UFp) +GO(udev_device_has_tag, iFpp) +GO(udev_enumerate_ref, pFp) +GO(udev_enumerate_unref, pFp) +GO(udev_enumerate_get_udev, pFp) +GO(udev_enumerate_new, pFp) +GO(udev_enumerate_add_match_subsystem, iFpp) +GO(udev_enumerate_add_nomatch_subsystem, iFpp) +GO(udev_enumerate_add_match_sysattr, iFppp) +GO(udev_enumerate_add_nomatch_sysattr, iFppp) +GO(udev_enumerate_add_match_property, iFppp) +GO(udev_enumerate_add_match_tag, iFpp) +GO(udev_enumerate_add_match_parent, iFpp) +GO(udev_enumerate_add_match_is_initialized, iFp) +GO(udev_enumerate_add_match_sysname, iFpp) +GO(udev_enumerate_add_syspath, iFpp) +GO(udev_enumerate_scan_devices, iFp) +GO(udev_enumerate_scan_subsystems, iFp) +GO(udev_enumerate_get_list_entry, pFp) +GO(udev_list_entry_get_next, pFp) +GO(udev_list_entry_get_by_name, pFpp) +GO(udev_list_entry_get_name, pFp) +GO(udev_list_entry_get_value, pFp) +GO(udev_monitor_ref, pFp) +GO(udev_monitor_unref, pFp) +GO(udev_monitor_get_udev, pFp) +GO(udev_monitor_new_from_netlink, pFpp) +GO(udev_monitor_new_from_socket, pFpp) +GO(udev_monitor_enable_receiving, iFp) +GO(udev_monitor_set_receive_buffer_size, iFpi) +GO(udev_monitor_get_fd, iFp) +GO(udev_monitor_receive_device, pFp) +GO(udev_monitor_filter_add_match_subsystem_devtype, iFppp) +GO(udev_monitor_filter_add_match_tag, iFpp) +GO(udev_monitor_filter_update, iFp) +GO(udev_monitor_filter_remove, iFp) +GO(udev_new, pFv) +GO(udev_ref, pFp) +GO(udev_unref, pFp) +GO(udev_queue_ref, pFp) +GO(udev_queue_unref, vFp) +GO(udev_queue_get_udev, pFp) +GO(udev_queue_new, pFp) +GO(udev_queue_get_kernel_seqnum, UFp) +GO(udev_queue_get_udev_seqnum, UFp) +GO(udev_queue_get_udev_is_active, iFp) +GO(udev_queue_get_queue_is_empty, iFp) +GO(udev_queue_get_seqnum_is_finished, iFpU) +GO(udev_queue_get_seqnum_sequence_is_finished, iFpUU) +GO(udev_queue_get_queued_list_entry, pFp) +GO(udev_queue_get_failed_list_entry, pFp) |