Lines Matching refs:attr
134 TK_M_ENV, /* val, attr */
139 TK_M_ATTR, /* val, attr */
140 TK_M_SYSCTL, /* val, attr */
146 TK_M_ATTRS, /* val, attr */
174 TK_A_SECLABEL, /* val, attr */
175 TK_A_ENV, /* val, attr */
178 TK_A_ATTR, /* val, attr */
179 TK_A_SYSCTL, /* val, attr */
331 const char *attr = &rules->buf[token->key.attr_off];
386 token_str(type), operation_str(op), attr, value, string_glob_str(glob));
420 log_debug("%s %s '%s' '%s'", token_str(type), operation_str(op), attr, value);
689 static int attr_subst_subdir(char *attr, size_t len) {
692 if (strstr(attr, "/*/")) {
698 strscpy(dirname, sizeof(dirname), attr);
713 strscpyl(attr, len, dirname, "/", dent->d_name, tail, NULL);
714 if (stat(attr, &stats) == 0) {
815 /* extract possible KEY{attr} */
818 char *attr;
820 attr = strchr(str, '{');
821 if (attr != NULL) {
822 attr++;
823 pos = strchr(attr, '}');
829 return attr;
838 const char *attr = NULL;
885 attr = data;
887 token->key.attr_off = rules_add_string(rule_tmp->rules, attr);
959 if (attr != NULL) {
961 if (attr[0] == '[')
963 else if (strchr(attr, '%') != NULL || strchr(attr, '$') != NULL)
1016 const char *attr;
1110 attr = get_key_attribute(rules->udev, key + strlen("ATTR"));
1111 if (attr == NULL) {
1120 rule_add_key(&rule_tmp, TK_M_ATTR, op, value, attr);
1122 rule_add_key(&rule_tmp, TK_A_ATTR, op, value, attr);
1127 attr = get_key_attribute(rules->udev, key + strlen("SYSCTL"));
1128 if (attr == NULL) {
1137 rule_add_key(&rule_tmp, TK_M_SYSCTL, op, value, attr);
1139 rule_add_key(&rule_tmp, TK_A_SYSCTL, op, value, attr);
1144 attr = get_key_attribute(rules->udev, key + strlen("SECLABEL"));
1145 if (!attr) {
1154 rule_add_key(&rule_tmp, TK_A_SECLABEL, op, value, attr);
1190 attr = get_key_attribute(rules->udev, key + strlen("ATTRS"));
1191 if (attr == NULL) {
1195 if (startswith(attr, "device/"))
1198 else if (strstr(attr, "../") != NULL)
1201 rule_add_key(&rule_tmp, TK_M_ATTRS, op, value, attr);
1215 attr = get_key_attribute(rules->udev, key + strlen("ENV"));
1216 if (attr == NULL) {
1225 if (rule_add_key(&rule_tmp, TK_M_ENV, op, value, attr) != 0)
1244 if (!streq(attr, blacklist[i]))
1246 log_error("invalid ENV attribute, '%s' can not be set %s:%u", attr, filename, lineno);
1249 if (rule_add_key(&rule_tmp, TK_A_ENV, op, value, attr) != 0)
1282 attr = get_key_attribute(rules->udev, key + strlen("IMPORT"));
1283 if (attr == NULL) {
1291 if (streq(attr, "program")) {
1305 } else if (streq(attr, "builtin")) {
1312 } else if (streq(attr, "file")) {
1314 } else if (streq(attr, "db")) {
1316 } else if (streq(attr, "cmdline")) {
1318 } else if (streq(attr, "parent")) {
1332 attr = get_key_attribute(rules->udev, key + strlen("TEST"));
1333 if (attr != NULL) {
1334 mode = strtol(attr, NULL, 8);
1343 attr = get_key_attribute(rules->udev, key + strlen("RUN"));
1344 if (attr == NULL)
1345 attr = "program";
1351 if (streq(attr, "builtin")) {
1358 } else if (streq(attr, "program")) {
2492 char attr[UTIL_PATH_SIZE];
2496 if (util_resolve_subsys_kernel(event->udev, key_name, attr, sizeof(attr), 0) != 0)
2497 strscpyl(attr, sizeof(attr), udev_device_get_syspath(event->dev), "/", key_name, NULL);
2498 attr_subst_subdir(attr, sizeof(attr));
2501 log_debug("ATTR '%s' writing '%s' %s:%u", attr, value,
2504 f = fopen(attr, "we");
2507 log_error_errno(errno, "error writing ATTR{%s}: %m", attr);
2510 log_error_errno(errno, "error opening ATTR{%s} for writing: %m", attr);