diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 20:49:52 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 20:49:52 +0000 |
commit | 55944e5e40b1be2afc4855d8d2baf4b73d1876b5 (patch) | |
tree | 33f869f55a1b149e9b7c2b7e201867ca5dd52992 /src/shared/udev-util.h | |
parent | Initial commit. (diff) | |
download | systemd-55944e5e40b1be2afc4855d8d2baf4b73d1876b5.tar.xz systemd-55944e5e40b1be2afc4855d8d2baf4b73d1876b5.zip |
Adding upstream version 255.4.upstream/255.4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/shared/udev-util.h')
-rw-r--r-- | src/shared/udev-util.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/shared/udev-util.h b/src/shared/udev-util.h new file mode 100644 index 0000000..651d335 --- /dev/null +++ b/src/shared/udev-util.h @@ -0,0 +1,34 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +#pragma once + +#include "sd-device.h" + +#include "hashmap.h" +#include "time-util.h" + +int udev_set_max_log_level(char *str); +int udev_parse_config(void); + +int device_wait_for_initialization(sd_device *device, const char *subsystem, usec_t timeout_usec, sd_device **ret); +int device_wait_for_devlink(const char *path, const char *subsystem, usec_t timeout_usec, sd_device **ret); +int device_is_renaming(sd_device *dev); + +bool device_for_action(sd_device *dev, sd_device_action_t action); + +void log_device_uevent(sd_device *device, const char *str); + +size_t udev_replace_whitespace(const char *str, char *to, size_t len); +size_t udev_replace_chars(char *str, const char *allow); + +int udev_queue_is_empty(void); + +bool udev_available(void); + +int device_get_vendor_string(sd_device *device, const char **ret); +int device_get_model_string(sd_device *device, const char **ret); + +int device_get_property_value_with_fallback( + sd_device *device, + const char *prop, + Hashmap *extra_props, + const char **ret); |