It will be used in later commits.
return r >= 0;
}
+
+bool device_for_action(sd_device *dev, DeviceAction action) {
+ DeviceAction a;
+
+ assert(dev);
+
+ if (device_get_action(dev, &a) < 0)
+ return false;
+
+ return a == action;
+}
#include "sd-device.h"
+#include "device-private.h"
#include "time-util.h"
typedef enum ResolveNameTiming {
int device_wait_for_initialization(sd_device *device, const char *subsystem, sd_device **ret);
int device_is_renaming(sd_device *dev);
+bool device_for_action(sd_device *dev, DeviceAction action);