return false;
break;
case SB_SUBSYS:
- if (util_resolve_subsys_kernel(name, vbuf, sizeof(vbuf), true) != 0)
+ if (util_resolve_subsys_kernel(name, vbuf, sizeof(vbuf), true) < 0)
return false;
value = vbuf;
break;
int match;
udev_event_apply_format(event, rules_str(rules, cur->key.value_off), filename, sizeof(filename), false);
- if (util_resolve_subsys_kernel(filename, filename, sizeof(filename), false) != 0) {
+ if (util_resolve_subsys_kernel(filename, filename, sizeof(filename), false) < 0) {
if (filename[0] != '/') {
char tmp[UTIL_PATH_SIZE];
char import[UTIL_PATH_SIZE];
udev_event_apply_format(event, rules_str(rules, cur->key.value_off), import, sizeof(import), false);
- if (import_file_into_properties(dev, import) != 0)
+ if (import_file_into_properties(dev, import) < 0)
if (cur->key.op != OP_NOMATCH)
goto nomatch;
break;
rules_str(rules, rule->rule.filename_off),
rule->rule.filename_line);
- if (import_program_into_properties(event, timeout_usec, import) != 0)
+ if (import_program_into_properties(event, timeout_usec, import) < 0)
if (cur->key.op != OP_NOMATCH)
goto nomatch;
break;
char import[UTIL_PATH_SIZE];
udev_event_apply_format(event, rules_str(rules, cur->key.value_off), import, sizeof(import), false);
- if (import_parent_into_properties(dev, import) != 0)
+ if (import_parent_into_properties(dev, import) < 0)
if (cur->key.op != OP_NOMATCH)
goto nomatch;
break;
const char *key_name;
key_name = rules_str(rules, cur->key.attr_off);
- if (util_resolve_subsys_kernel(key_name, attr, sizeof(attr), false) != 0 &&
+ if (util_resolve_subsys_kernel(key_name, attr, sizeof(attr), false) < 0 &&
sd_device_get_syspath(dev, &val) >= 0)
strscpyl(attr, sizeof(attr), val, "/", key_name, NULL);
attr_subst_subdir(attr, sizeof(attr));
goto next;
strscpyl(device_node, sizeof(device_node), "/dev/", rules_str(rules, cur->key.value_off), NULL);
- if (stat(device_node, &stats) != 0)
+ if (stat(device_node, &stats) < 0)
break;
if (!S_ISBLK(stats.st_mode) && !S_ISCHR(stats.st_mode))
break;