| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
GUdevDevice contains snapshot of information when device object
was created. Cache tags on device creation to follow this rule.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Starting with systemd-udevd 247 tags are "sticky" meaning that once
a tag is assigned to a device it will not be removed from the device
again until the device itself is removed.
New property CURRENT_TAGS has been added that works similar to the
existing TAGS property but only lists tags set by the most recent
uevent/database update.
https://lists.freedesktop.org/archives/systemd-devel/2020-November/045646.html
|
| |
|
| |
|
| |
|
|
|
|
| |
Add a test for it, as it has a custom cache on top of udev.
|
|
|
|
|
| |
Honestly, we could even add that into the API itself, calling the proper
underlying udev function.
|
| |
|
|
|
|
|
| |
Just to make it a bit nicer, no need to assert the number of devices
each time and such.
|
|
|
|
|
|
| |
No need to duplicate this between tests once we add more tests. Also, it
fixes the issue that the testbed was not free'ed resulting in the test
directory to not be deleted.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
These inconsistencies caused devhelp to not find the documentation.
Change things to package_name so that the install location stays
consistent.
|
|
|
|
|
| |
Spotted by Mike Gilbert:
https://gitlab.gnome.org/GNOME/libgudev/-/merge_requests/20#note_1265114
|
|
|
|
| |
See https://gitlab.gnome.org/GNOME/libgudev/-/merge_requests/19
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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))
| ^~~~~~~~~~~~~~~~~
|
|
|
|
|
| |
@filename@ writes the full path to the generated file,
which can vary in CI systems and make outputs non-reproducible.
|
| |
|
| |
|
| |
|
|
|
|
| |
And convert it to MarkDown.
|
| |
|
|
|
|
|
|
|
|
| |
In the meson port, the package name was changed from 'libgudev' to
'gudev'. Rename the meson project, and fix the 'package_name' to match
the short name to avoid 'liblibgudev' names.
Fixes: 334f31b3cf0837ffb2298f498686905e8ba14f7b
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The changes made haphazardly in e186dac0 and 31e31d52 were documented
for _sysfs_attr_as_boolean_uncached() but not implemented.
|
|
|
|
|
| |
The behaviour was changed in commit e186dac0, but the documentation
wasn't updated.
|
|
|
|
|
| |
We weren't supposed to change the strings recognised as booleans, which
we only documented and didn't actually implement.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Until developer.gnome.org has a good way to integrate with meson, link
to our own deployment of the docs, generated by the CI.
Closes: #6
|
| |
|
|
|
|
|
|
|
| |
Publish documentation on GitLab pages as meson does not embed generated
documentation in distribution tarballs. Pages URL:
https://gnome.pages.gitlab.gnome.org/libgudev/libgudev
|
| |
|
| |
|
|
|
|
|
| |
The meson build system focuses on speed an ease of use,
which helps speeding up the software development.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
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.
|
|
|
|
| |
Follow-up to d0bd1da7a14323497b435b37ec99aa9375e751c1
|
|
|
|
|
|
|
|
| |
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
|
| |
|