2020-07-13T15:50:21 #kisslinux himmalerin: I've looked through util-linux multiple times trying to figure out how it finds PARTUUID and I always end up giving up confused, I wish I could figure out how to get PARTUUID without libblkid 2020-07-13T15:51:03 #kisslinux illiliti: nice, you switched to the ioctl 2020-07-13T15:53:37 #kisslinux could you add support for touchscreens? 2020-07-13T16:00:02 #kisslinux i'll try 2020-07-13T16:06:25 #kisslinux from what I can gather I think you also have to use EVIOCGPROP or the properties sysfs file for additional information for checking if it's a touchscreen 2020-07-13T16:10:03 #kisslinux no, EVIOCGPROP is not necessary 2020-07-13T16:10:09 #kisslinux from kernel docs: 2020-07-13T16:10:10 #kisslinux Note: Historically a touch device with BTN_TOOL_FINGER and BTN_TOUCH was interpreted as a touchpad by userspace, while a similar device without BTN_TOOL_FINGER was interpreted as a touchscreen. For backwards compatibility with current userspace it is recommended to follow this distinction. In the future, this distinction will be deprecated and the device properties ioctl EVIOCGPROP, defined in 2020-07-13T16:10:16 #kisslinux linux/input.h, will be used to convey the device type. 2020-07-13T16:11:13 #kisslinux i.e device without BTN_TOOL_FINGER is touchscreen 2020-07-13T16:14:24 #kisslinux deprecation doesn't mean `it will not work in future`. kernel doesn't break userspace(c) 2020-07-13T16:17:55 #kisslinux makes sense 2020-07-13T16:37:14 #kisslinux pushed 2020-07-13T16:37:37 #kisslinux but i don't have a ability to test it... 2020-07-13T16:38:54 #kisslinux you can test it by using LD_LIBRARY_PATH 2020-07-13T16:39:19 #kisslinux e.g LD_LIBRARY_PATH= libinput list-devices 2020-07-13T16:51:45 #kisslinux I can just switch my config to an InputClass and see if I have a touchscreen when I start xorg lol 2020-07-13T17:10:46 #kisslinux doesn't seem to be adding ID_INPUT_TOUCHSCREEN to mine 2020-07-13T17:11:33 #kisslinux lemme double check that I didn't mess up and accidentally build with an older commit or something 2020-07-13T17:13:58 #kisslinux yeah nevermind, it's working, thanks 2020-07-13T17:15:38 #kisslinux nice 2020-07-13T17:55:41 #kisslinux i really hate xauth 2020-07-13T18:01:32 #kisslinux why do you need this crap? kill it with fire 2020-07-13T18:12:06 #kisslinux Does busybox's `sed -E` not know about negating escaped characters? [^a] works but [^]] doesn't 2020-07-13T18:14:17 #kisslinux The full command I'm trying to use is `sed -E 's|([)([^]]+)(])|a|gi' regex-test` with a file named "regex-test" containing just `[test]` 2020-07-13T18:14:34 #kisslinux kill xauth with fire? would be nice 2020-07-13T18:16:32 #kisslinux you don't escape the ] there, if you want to include [ or ] in the range, you make them the first characters after it opens (or after the ^ if you're negating) 2020-07-13T18:17:04 #kisslinux like [][] matches either [ or ] 2020-07-13T18:17:54 #kisslinux cuz it knows that there's nothing in between the opening [ and the first ], so it considers the ] part of the range instead of thinking it's the closing ] 2020-07-13T18:18:22 #kisslinux what does [[]] do? 2020-07-13T18:19:13 #kisslinux matches exactly [], because the [[] matches the only character in the range, '[', and then there's the ] at the end that isn't part of the range 2020-07-13T18:19:33 #kisslinux ah k 2020-07-13T18:20:26 #kisslinux I don't know why you put capture groups around all that stuff though if you're not using 1 etc.? 2020-07-13T18:21:01 #kisslinux sed -E 's|[[^]]+]|a|gi' would be the same wouldn't it? 2020-07-13T18:23:07 #kisslinux I am, I just trimmed it out a replaced it with 'a' to try and simplify it when I was trying to figure out what was wrong, I use 2. `sed -E 's|[[^]]+]|a|gi'` doesn't seem to match anything 2020-07-13T18:23:40 #kisslinux you escape the [ and ] at the beginning and end, just not the one in the range 2020-07-13T18:23:58 #kisslinux I think my client ate the backslashes I put for the [ at the beginning and ] at the end lol 2020-07-13T18:25:09 #kisslinux whoops! Yeah, the corrected backslash version seems to work! 2020-07-13T18:26:44 #kisslinux Think I still need the original version though since I was using 2, but I simplified it down to [([^]]+)] and I switched to 1 2020-07-13T18:29:10 #kisslinux `sed -E 's|[([^]])+]|1|gi'` gives me 't' (the first letter), whereas `sed -e 's|[[([^]]+)]]|1|gi'` gives me 'test' 2020-07-13T18:40:12 #kisslinux illiliti: wouldn't it be beneficial to get the EVIOCGPROP data for other device types you might add in the future, and for distinguishing devices that emit the same event types? 2020-07-13T18:56:50 #kisslinux E5ten: if someone need device that requires EVIOCPROP, i'll do that 2020-07-13T18:59:03 #kisslinux afaik only accelerometer can be detected via EVIOCGPROP 2020-07-13T18:59:28 #kisslinux i don't use accelerometer 2020-07-13T19:08:41 #kisslinux illiliti: also, I think a lot of functions that you don't have as static should be static? like anything that isn't a udev API function, because otherwise someone else could have a function named e.g. test_bit, link libudev-zero, and I think there'd be a conflict 2020-07-13T19:23:36 #kisslinux nope, i added '-fvisibility=hidden' . i.e all functions that doesn't have UDEV_EXPORT are hidden 2020-07-13T19:23:44 #kisslinux https://github.com/illiliti/libudev-zero/blob/master/Makefile#L6 2020-07-13T19:23:49 #kisslinux ah, I see 2020-07-13T19:25:00 #kisslinux but for functions not used outside of the file they're in, is there any reason not to mark them static? 2020-07-13T19:26:12 #kisslinux no reason, but there any reason to mark them static? 2020-07-13T19:26:37 #kisslinux i think it's senseless 2020-07-13T19:27:18 #kisslinux imo it'd be preferable if things worked as intended even if someone overrid -fvisibility=hidden or, compiled source files manually, etc. 2020-07-13T19:28:25 #kisslinux overriding -fvisibility=hidden breaks things 2020-07-13T19:31:23 #kisslinux also, 'static' breaks shared functions. see udev_list.c 2020-07-13T19:32:41 #kisslinux to properly use 'static' i need to combine all files into one which is horrible i guess... 2020-07-13T19:35:58 #kisslinux static provide less flexibility than visibility=hidden|default 2020-07-13T19:38:39 #kisslinux fair enough, but aside from udev_list stuff, you could still mark all other non-exported functions static and remove the headers that're only included by the corresponding .c, and that wouldn't take away from your ability to use -fvisibility=hidden or UDEV_EXPORT or anything 2020-07-13T19:47:58 #kisslinux pushed 2020-07-13T19:49:05 #kisslinux wow, gcc popups a lot of warnings while clang don't 2020-07-13T19:49:15 #kisslinux lol 2020-07-13T19:54:51 #kisslinux oh lol, what're the warnings, I use clang so I didn't get them 2020-07-13T19:55:13 #kisslinux me too, lmao 2020-07-13T19:56:17 #kisslinux do you mean new warnings cuz of the static stuff or just normal warnings you hadn't noticed till now cuz you don't use gcc? 2020-07-13T19:56:37 #kisslinux termbin.com/kkbo 2020-07-13T19:57:39 #kisslinux I guess you should make file PATH_MAX + 7 lol? 2020-07-13T19:58:52 #kisslinux I don't even understand the EVIOCGBIT ones 2020-07-13T20:05:22 #kisslinux I think the sys/sysmacros.h include in udev_enumerate.c isn't needed 2020-07-13T20:16:38 #kisslinux and this recommendation is definitely one I'd understand not wanting to do, cuz it's a lot more intrusive than just adding "static", but if you wanted to make it so one could have the correct symbols visible even if they built without -fvisibility=hidden you could move the unexported udev_list functions to udev_list.h from udev_list.c, and mark them static inline 2020-07-13T20:53:16 #kisslinux hmmm, those EVIOCGBIT warnings are really gcc shenanigans 2020-07-13T20:54:06 #kisslinux casting EVIOCGBIT macro to int fixes the warning 2020-07-13T22:56:04 #kisslinux I don't understand those warnings at all, why is it being converted to int at all when the arg to ioctl is unsigned long? 2020-07-13T23:10:42 #kisslinux ioctl(int fd, int req, ...) 2020-07-13T23:11:54 #kisslinux oh, I'm on glibc lol, that's why, I wonder why musl has int argument and glibc has unsigned long 2020-07-13T23:12:36 #kisslinux POSIX has int 2020-07-13T23:14:28 #kisslinux https://github.com/ensc/dietlibc/blob/master/include/sys/ioctl.h#L34 2020-07-13T23:14:46 #kisslinux https://github.com/wbx-github/uclibc-ng/blob/master/include/sys/ioctl.h#L41 2020-07-13T23:15:03 #kisslinux so it varies a lot then 2020-07-13T23:36:54 #kisslinux i wonder why this https://github.com/illiliti/libudev-zero/blob/master/udev_device.c#L324 doesn't trigger gcc truncation warning while this https://github.com/illiliti/libudev-zero/blob/master/udev_device.c#L463 does lol 2020-07-13T23:42:16 #kisslinux cuz there you're adding a char pointer with unspecified size, whereas with the other one you're printing a char array of PATH_MAX size, so it knows you're expecting to get up to PATH_MAX - 1 characters in the first char array, and if you got that many and then put that and "/uevent" in the second one it'd truncate 2020-07-13T23:45:13 #kisslinux ok, thanks