struct stat stats;
/* we assure, that the permissions tokens are sorted before the static token */
+
if (mode == 0 && uid == 0 && gid == 0 && tags == NULL)
goto next;
strscpyl(device_node, sizeof(device_node), "/dev/", rules_str(rules, cur->key.value_off), NULL);
+ if (stat(device_node, &stats) != 0)
+ break;
+ if (!S_ISBLK(stats.st_mode) && !S_ISCHR(stats.st_mode))
+ break;
/* export the tags to a directory as symlinks, allowing otherwise dead nodes to be tagged */
if (tags) {
if (mode == 0 && uid == 0 && gid == 0)
break;
- if (stat(device_node, &stats) != 0)
- break;
- if (!S_ISBLK(stats.st_mode) && !S_ISCHR(stats.st_mode))
- break;
-
if (mode == 0) {
if (gid > 0)
mode = 0660;