summaryrefslogtreecommitdiff
path: root/gudev
Commit message (Collapse)AuthorAgeFilesLines
* build: let meson handle gir, vala, gtk-doc dependenciesHEADmasterArtturi2022-07-111-1/+1
|
* gudev: Document the _uncached variant addition and fixed versionsbenzea/fix-newline-strippingBenjamin Berg2022-06-011-0/+26
|
* gudev: Fix newline stripping by always reading using udevBenjamin Berg2022-05-311-93/+13
| | | | | | | | | | libudev will strip trailing newline characters ("\r\n") when reading sysfs attributes. The uncached reading functions however bypassed the udev mechanism unnecessarily and then added their own cache on top. Setting the value to NULL clears the internal cache in systemd. As such, we can simply do this and then fall back to the normal implementation to implement the _uncached version of the sysfs attribute getters.
* gudev: Fix double parsing in locale with , as a decimal separatorBastien Nocera2021-08-131-6/+6
| | | | | | | All the functions parsing double values from sysfs were using strtod to parse the values instead of g_ascii_strtod() which forces C locale parsing. All the kernel values use C locale formatted doubles, so use g_ascii_strtod().
* gudev: Fix compilation warninglindevel2021-07-221-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Currently, the volative qualification is not needed here, it is a historical artifact Compiler output: In file included from /usr/include/glib-2.0/glib/gthread.h:32, from /usr/include/glib-2.0/glib/gasyncqueue.h:32, from /usr/include/glib-2.0/glib.h:32, from /usr/include/glib-2.0/gobject/gbinding.h:28, from /usr/include/glib-2.0/glib-object.h:22, from ../gudev/gudevenums.h:14, from ../gudev/gudev.h:11, from gudev/gudevenumtypes.c:4: gudev/gudevenumtypes.c: In function 'g_udev_device_type_get_type': /usr/include/glib-2.0/glib/gatomic.h:117:5: warning: argument 2 of '__atomic_load' discards 'volatile' qualifier [-Wincompatible-pointer-types] 117 | __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \ | ^~~~~~~~~~~~~ /usr/include/glib-2.0/glib/gthread.h:260:7: note: in expansion of macro 'g_atomic_pointer_get' 260 | (!g_atomic_pointer_get (location) && \ | ^~~~~~~~~~~~~~~~~~~~ gudev/gudevenumtypes.c:11:7: note: in expansion of macro 'g_once_init_enter' 11 | if (g_once_init_enter (&g_define_type_id__volatile)) | ^~~~~~~~~~~~~~~~~
* gudev: make reproducibleAlexander Kanavin2021-04-292-2/+2
| | | | | @filename@ writes the full path to the generated file, which can vary in CI systems and make outputs non-reproducible.
* all: Use SPDX headersBastien Nocera2021-03-3010-137/+20
|
* gudev: Update headers to LGPLv2.1+Bastien Nocera2021-03-2510-63/+50
|
* gudev: Fix 'Y' in _sysfs_attr_as_boolean_uncached()Bastien Nocera2021-03-161-4/+12
| | | | | The changes made haphazardly in e186dac0 and 31e31d52 were documented for _sysfs_attr_as_boolean_uncached() but not implemented.
* gudev: Update g_udev_device_get_sysfs_attr_as_boolean() docBastien Nocera2021-03-161-1/+1
| | | | | The behaviour was changed in commit e186dac0, but the documentation wasn't updated.
* gudev: Revert changes to g_udev_device_get_property_as_boolean()Bastien Nocera2021-03-161-1/+1
| | | | | We weren't supposed to change the strings recognised as booleans, which we only documented and didn't actually implement.
* gudev: Ignore trailing linefeeds in sysfs attrBastien Nocera2021-03-161-3/+18
| | | | | | | | | | sysfs attributes which contain text will almost always contain a '\n' at the end so that they can be cat'ed cleanly from the shell. Fix g_udev_device_get_sysfs_attr_as_boolean to take this into account by cutting off the string before the first '\n' if it is present. Closes: #7
* gudev: Add support for Y/N, y/n as bool sysfs attributesBastien Nocera2021-03-161-3/+7
| | | | | | | | | | | | Which matches the string representation of a "bool" as used in module parameters: " Standard types are: [...] * bool: a bool, values 0/1, y/n, Y/N. " See https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/moduleparam.h#n123
* Port to meson build systemMartin Blanchard2020-11-201-0/+133
| | | | | The meson build system focuses on speed an ease of use, which helps speeding up the software development.
* gudev: Add helpers to get uncached sysfs attributeswip/hadess/add-uncached-helpersBastien Nocera2020-09-152-7/+268
| | | | | We very often need to access the current value of sysfs attributes. Add functions that do I/O on the sysfs files and update the cache.
* gudev: g_udev_device_has_sysfs_attr() is also cachedBastien Nocera2020-09-141-2/+5
| | | | Follow-up to d0bd1da7a14323497b435b37ec99aa9375e751c1
* gudev: Mention that sysfs_attr functions are cachedBastien Nocera2020-07-161-5/+17
| | | | | | | | Bit me once again, so best to make it clear in the API documentation that sysfs_attr are only fetched _once_. libgudev calls udev_device_get_sysattr_value() which says in its docs: https://github.com/systemd/systemd/blob/4d939d2c849fea2169082451a90722030dca5139/src/libudev/libudev-device.c#L730-L731
* gudev: Remove use of deprecated g_type_class_add_private()Bastien Nocera2019-04-293-18/+6
| | | | | | And replace with the G_ADD_PRIVATE() as available in glib 2.38. Closes: #2
* gudev: Add note about possible actionsBastien Nocera2017-09-071-0/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=787314
* gudev: Add note about props/attrs when action is "remove"Bastien Nocera2017-09-051-0/+4
| | | | | | This takes the guesswork out of it. https://bugzilla.gnome.org/show_bug.cgi?id=787314
* gudev: Update list of possible actionsBastien Nocera2017-09-051-1/+2
| | | | | | | | Add "online" and "offline" actions as per: src/libsystemd/sd-device/device-private.c in the systemd repository https://bugzilla.gnome.org/show_bug.cgi?id=787314
* gudev: Add autoptr support for all data typesBastien Nocera2017-08-313-0/+12
|
* enumerator: Ensure client subsystems are implicitly matchedRay Strode2016-11-023-6/+37
| | | | | | | | | | | | | g_udev_client_new takes an optional list of subsystems (and device types) to filter the udev event stream on. These subsystems aren't automatically matched for device enumeration, though, which is unexpected. This commit changes gudevenumerator to get its udev_enumerate object from gudevclient with the appropriate subsystem and device matches already set up. https://bugzilla.gnome.org/show_bug.cgi?id=773224
* gudev: Use generic marshallerBastien Nocera2016-11-023-4/+1
| | | | | And require a newer glib for that functionality. glib 2.30 was released in 2011, so seems new enough for us to make use of it.
* treewide: Correct typos and spell plural of bus consistentTorstein Husebø2015-06-021-1/+1
| | | | | | (David: backported to libgudev from systemd upstream) https://bugzilla.gnome.org/show_bug.cgi?id=750232
* Initial importDavid Herrmann2015-05-0713-0/+2558
Import initial libgudev from systemd-218. This includes the libgudev sources, the introspection data and gtk-doc reference documentation.