}
if (sd_device_get_devnum(dev, NULL) >= 0 &&
(sd_device_get_devname(dev, &val) < 0 ||
- !streq_ptr(buf, startswith(val, "/dev/")))) {
+ !streq_ptr(buf, path_startswith(val, "/dev/")))) {
log_rule_error(dev, rules,
"Kernel device nodes cannot be renamed, ignoring NAME=\"%s\"; please fix it.",
token->value);
#include "device-private.h"
#include "device-util.h"
#include "libudev-util.h"
+#include "path-util.h"
#include "string-util.h"
#include "strxcpyx.h"
#include "udev-builtin.h"
"syspath parameter missing.");
/* add /sys if needed */
- if (!startswith(argv[optind], "/sys"))
+ if (!path_startswith(argv[optind], "/sys"))
strscpyl(arg_syspath, sizeof(arg_syspath), "/sys", argv[optind], NULL);
else
strscpy(arg_syspath, sizeof(arg_syspath), argv[optind]);