- if (rule->name_operation != KEY_OP_UNSET) {
- udev->name_set = 1;
- if (rule->name[0] == '\0') {
- info("configured rule in '%s[%i]' applied, node handling for '%s' supressed",
- rule->config_file, rule->config_line, udev->kernel_name);
- } else {
- strlcpy(udev->name, rule->name, sizeof(udev->name));
- apply_format(udev, udev->name, sizeof(udev->name), class_dev, sysfs_device);
- strlcpy(udev->config_file, rule->config_file, sizeof(udev->config_file));
- udev->config_line = rule->config_line;
-
- info("configured rule in '%s:%i' applied, '%s' becomes '%s'",
- rule->config_file, rule->config_line, udev->kernel_name, rule->name);
- if (udev->type != DEV_NET)
- dbg("name, '%s' is going to have owner='%s', group='%s', mode=%#o partitions=%i",
- udev->name, udev->owner, udev->group, udev->mode, udev->partitions);
- }
+ if (rule->name.operation != KEY_OP_UNSET) {
+ name_set = 1;
+ strlcpy(udev->name, key_val(rule, &rule->name), sizeof(udev->name));
+ apply_format(udev, udev->name, sizeof(udev->name), class_dev, sysfs_device);
+
+ info("rule applied, '%s' becomes '%s'", udev->kernel_name, udev->name);
+ if (udev->type != DEV_NET)
+ dbg("name, '%s' is going to have owner='%s', group='%s', mode=%#o partitions=%i",
+ udev->name, udev->owner, udev->group, udev->mode, udev->partitions);