mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
udev-util: introduce device_is_processing() helper function
This commit is contained in:
parent
1e7c8fe494
commit
f30a47c45e
@ -239,6 +239,18 @@ int device_is_renaming(sd_device *dev) {
|
||||
return r;
|
||||
}
|
||||
|
||||
int device_is_processing(sd_device *dev) {
|
||||
int r;
|
||||
|
||||
assert(dev);
|
||||
|
||||
r = device_get_property_bool(dev, "ID_PROCESSING");
|
||||
if (r == -ENOENT)
|
||||
return false; /* defaults to false */
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
bool device_for_action(sd_device *dev, sd_device_action_t a) {
|
||||
sd_device_action_t b;
|
||||
|
||||
|
@ -13,6 +13,7 @@ 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);
|
||||
int device_is_processing(sd_device *dev);
|
||||
|
||||
bool device_for_action(sd_device *dev, sd_device_action_t action);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user