about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-06-11 16:41:44 +0200
committerptitSeb <sebastien.chev@gmail.com>2024-06-11 16:41:44 +0200
commitc404b3e0ab96d40ea8880eddde54a45ffe4b201e (patch)
treeb4413330cf49c036d0143400e52a683d8e88e31e /src
parentb246133b3b46b3257fb1f66ab4b6125089560870 (diff)
downloadbox64-c404b3e0ab96d40ea8880eddde54a45ffe4b201e.tar.gz
box64-c404b3e0ab96d40ea8880eddde54a45ffe4b201e.zip
Fixed libudev.so.0 wrapping, removed functions from libudev.so.1
Diffstat (limited to 'src')
-rw-r--r--src/wrapped/generated/functions_list.txt2
-rw-r--r--src/wrapped/generated/wrappedudev0types.h4
-rw-r--r--src/wrapped/wrappedudev0.c44
-rw-r--r--src/wrapped/wrappedudev0_private.h82
4 files changed, 6 insertions, 126 deletions
diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt
index 14b843f0..28098439 100644
--- a/src/wrapped/generated/functions_list.txt
+++ b/src/wrapped/generated/functions_list.txt
@@ -5506,8 +5506,6 @@ wrappedtcmallocminimal:
   - mmap
   - mmap64
 wrappedudev0:
-- vFpp:
-  - udev_set_log_fn
 wrappedudev1:
 - vFpp:
   - udev_set_log_fn
diff --git a/src/wrapped/generated/wrappedudev0types.h b/src/wrapped/generated/wrappedudev0types.h
index e27a8e21..9226453b 100644
--- a/src/wrapped/generated/wrappedudev0types.h
+++ b/src/wrapped/generated/wrappedudev0types.h
@@ -11,9 +11,7 @@
 #define ADDED_FUNCTIONS() 
 #endif
 
-typedef void (*vFpp_t)(void*, void*);
 
-#define SUPER() ADDED_FUNCTIONS() \
-	GO(udev_set_log_fn, vFpp_t)
+#define SUPER() ADDED_FUNCTIONS()
 
 #endif // __wrappedudev0TYPES_H_
diff --git a/src/wrapped/wrappedudev0.c b/src/wrapped/wrappedudev0.c
index 3c13853e..d12e625d 100644
--- a/src/wrapped/wrappedudev0.c
+++ b/src/wrapped/wrappedudev0.c
@@ -18,14 +18,12 @@
 
 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"
 
 #define ADDED_FUNCTIONS()           \
 
-#include "generated/wrappedudev0types.h"
+//#include "generated/wrappedudev0types.h"
 
-#include "wrappercallback.h"
+//#include "wrappercallback.h"
 
 #define SUPER() \
 GO(0)   \
@@ -34,46 +32,8 @@ GO(2)   \
 GO(3)   \
 GO(4)
 
-// log_fn ...
-#ifdef CONVERT_VALIST
-#define GO(A)   \
-static uintptr_t my_log_fn_fct_##A = 0;                                                                 \
-static void my_log_fn_##A(void* udev, int p, void *f, int l, void* fn, void* fmt, x64_va_list_t args)   \
-{                                                                                                       \
-    CONVERT_VALIST(args)                                                                                \
-    RunFunction(my_log_fn_fct_##A, 7, udev, p, f, l, fn, fmt, VARARGS);                                 \
-}
-#else
-#define GO(A)   \
-static uintptr_t my_log_fn_fct_##A = 0;                                                                 \
-static void my_log_fn_##A(void* udev, int p, void *f, int l, void* fn, void* fmt, x64_va_list_t args)   \
-{                                                                                                       \
-    CREATE_VALIST_FROM_VALIST(args, thread_get_emu()->scratch);                                         \
-    RunFunction(my_log_fn_fct_##A, 7, udev, p, f, l, fn, fmt, VARARGS);                                 \
-}
-#endif
-SUPER()
-#undef GO
-static void* find_log_fn_Fct(void* fct)
-{
-    if(!fct) return fct;
-    if(GetNativeFnc((uintptr_t)fct))  return GetNativeFnc((uintptr_t)fct);
-    #define GO(A) if(my_log_fn_fct_##A == (uintptr_t)fct) return my_log_fn_##A;
-    SUPER()
-    #undef GO
-    #define GO(A) if(my_log_fn_fct_##A == 0) {my_log_fn_fct_##A = (uintptr_t)fct; return my_log_fn_##A; }
-    SUPER()
-    #undef GO
-    printf_log(LOG_NONE, "Warning, no more slot for udev1 log_fn callback\n");
-    return NULL;
-}
 #undef SUPER
 
-EXPORT void my0_udev_set_log_fn(x64emu_t* emu, void* udev, void* f)
-{
-    my->udev_set_log_fn(udev, find_log_fn_Fct(f));
-}
-
 #define ALTMY my0_
 
 #define NEEDED_LIBS "libudev.so.1"
diff --git a/src/wrapped/wrappedudev0_private.h b/src/wrapped/wrappedudev0_private.h
index 57c999e5..fa89c34d 100644
--- a/src/wrapped/wrappedudev0_private.h
+++ b/src/wrapped/wrappedudev0_private.h
@@ -2,84 +2,8 @@
 #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_get_dev_path, pFp)
+GO(udev_get_run_path, pFp)
+GO(udev_get_sys_path, pFp)
 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)
-GOM(udev_set_log_fn, vFEpp)
-GO(udev_get_log_priority, iFp)
-GO(udev_set_log_priority, vFpi)
\ No newline at end of file