return 0;
}
+
+int udev_builtin_add_propertyf(sd_device *dev, bool test, const char *key, const char *valf, ...) {
+ _cleanup_free_ char *val = NULL;
+ va_list ap;
+ int r;
+
+ assert(dev);
+ assert(key);
+ assert(valf);
+
+ va_start(ap, valf);
+ r = vasprintf(&val, valf, ap);
+ va_end(ap);
+ if (r < 0)
+ return log_oom_debug();
+
+ return udev_builtin_add_property(dev, test, key, val);
+}
#include "sd-device.h"
#include "sd-netlink.h"
+#include "macro.h"
+
typedef enum UdevBuiltinCommand {
#if HAVE_BLKID
UDEV_BUILTIN_BLKID,
void udev_builtin_list(void);
bool udev_builtin_should_reload(void);
int udev_builtin_add_property(sd_device *dev, bool test, const char *key, const char *val);
+int udev_builtin_add_propertyf(sd_device *dev, bool test, const char *key, const char *valf, ...) _printf_(4, 5);
int udev_builtin_hwdb_lookup(sd_device *dev, const char *prefix, const char *modalias,
const char *filter, bool test);