Lines Matching defs:rule_tmp

223 struct rule_tmp {
834 static int rule_add_key(struct rule_tmp *rule_tmp, enum token_type type,
837 struct token *token = &rule_tmp->token[rule_tmp->token_cur];
871 token->key.value_off = rules_add_string(rule_tmp->rules, value);
874 token->key.value_off = rules_add_string(rule_tmp->rules, value);
886 token->key.value_off = rules_add_string(rule_tmp->rules, value);
887 token->key.attr_off = rules_add_string(rule_tmp->rules, attr);
890 token->key.value_off = rules_add_string(rule_tmp->rules, value);
901 token->key.value_off = rules_add_string(rule_tmp->rules, value);
971 rule_tmp->token_cur++;
972 if (rule_tmp->token_cur >= ELEMENTSOF(rule_tmp->token)) {
979 static int sort_token(struct udev_rules *rules, struct rule_tmp *rule_tmp) {
982 unsigned int end = rule_tmp->token_cur;
984 for (i = 0; i < rule_tmp->token_cur; i++) {
991 if (rule_tmp->token[j].type == TK_UNSET)
993 if (next_val == TK_UNSET || rule_tmp->token[j].type < next_val) {
994 next_val = rule_tmp->token[j].type;
1000 if (add_token(rules, &rule_tmp->token[next_idx]) != 0)
1002 rule_tmp->token[next_idx].type = TK_UNSET;
1017 struct rule_tmp rule_tmp = {
1024 rule_tmp.rule.rule.filename_off = filename_off;
1025 rule_tmp.rule.rule.filename_line = lineno;
1060 rule_add_key(&rule_tmp, TK_M_ACTION, op, value, NULL);
1069 rule_add_key(&rule_tmp, TK_M_DEVPATH, op, value, NULL);
1078 rule_add_key(&rule_tmp, TK_M_KERNEL, op, value, NULL);
1094 rule_add_key(&rule_tmp, TK_M_SUBSYSTEM, op, "subsystem|class|bus", NULL);
1096 rule_add_key(&rule_tmp, TK_M_SUBSYSTEM, op, value, NULL);
1105 rule_add_key(&rule_tmp, TK_M_DRIVER, op, value, 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);
1137 rule_add_key(&rule_tmp, TK_M_SYSCTL, op, value, attr);
1139 rule_add_key(&rule_tmp, TK_A_SYSCTL, op, value, attr);
1154 rule_add_key(&rule_tmp, TK_A_SECLABEL, op, value, attr);
1163 rule_add_key(&rule_tmp, TK_M_KERNELS, op, value, NULL);
1172 rule_add_key(&rule_tmp, TK_M_SUBSYSTEMS, op, value, NULL);
1181 rule_add_key(&rule_tmp, TK_M_DRIVERS, op, value, NULL);
1201 rule_add_key(&rule_tmp, TK_M_ATTRS, op, value, attr);
1210 rule_add_key(&rule_tmp, TK_M_TAGS, op, value, NULL);
1225 if (rule_add_key(&rule_tmp, TK_M_ENV, op, value, attr) != 0)
1249 if (rule_add_key(&rule_tmp, TK_A_ENV, op, value, attr) != 0)
1257 rule_add_key(&rule_tmp, TK_M_TAG, op, value, NULL);
1259 rule_add_key(&rule_tmp, TK_A_TAG, op, value, NULL);
1268 rule_add_key(&rule_tmp, TK_M_PROGRAM, op, value, NULL);
1277 rule_add_key(&rule_tmp, TK_M_RESULT, op, value, NULL);
1300 rule_add_key(&rule_tmp, TK_M_IMPORT_BUILTIN, op, value, &cmd);
1304 rule_add_key(&rule_tmp, TK_M_IMPORT_PROG, op, value, NULL);
1309 rule_add_key(&rule_tmp, TK_M_IMPORT_BUILTIN, op, value, &cmd);
1313 rule_add_key(&rule_tmp, TK_M_IMPORT_FILE, op, value, NULL);
1315 rule_add_key(&rule_tmp, TK_M_IMPORT_DB, op, value, NULL);
1317 rule_add_key(&rule_tmp, TK_M_IMPORT_CMDLINE, op, value, NULL);
1319 rule_add_key(&rule_tmp, TK_M_IMPORT_PARENT, op, value, NULL);
1335 rule_add_key(&rule_tmp, TK_M_TEST, op, value, &mode);
1337 rule_add_key(&rule_tmp, TK_M_TEST, op, value, NULL);
1355 rule_add_key(&rule_tmp, TK_A_RUN_BUILTIN, op, value, &cmd);
1361 rule_add_key(&rule_tmp, TK_A_RUN_PROGRAM, op, value, &cmd);
1374 rule_tmp.rule.rule.label_off = rules_add_string(rules, value);
1383 rule_add_key(&rule_tmp, TK_A_GOTO, 0, value, NULL);
1393 rule_add_key(&rule_tmp, TK_M_NAME, op, value, NULL);
1405 rule_add_key(&rule_tmp, TK_A_NAME, op, value, NULL);
1407 rule_tmp.rule.rule.can_set_name = true;
1417 rule_add_key(&rule_tmp, TK_M_DEVLINK, op, value, NULL);
1419 rule_add_key(&rule_tmp, TK_A_DEVLINK, op, value, NULL);
1420 rule_tmp.rule.rule.can_set_name = true;
1435 rule_add_key(&rule_tmp, TK_A_OWNER_ID, op, NULL, &uid);
1438 rule_add_key(&rule_tmp, TK_A_OWNER_ID, op, NULL, &uid);
1440 rule_add_key(&rule_tmp, TK_A_OWNER, op, value, NULL);
1442 rule_tmp.rule.rule.can_set_name = true;
1457 rule_add_key(&rule_tmp, TK_A_GROUP_ID, op, NULL, &gid);
1460 rule_add_key(&rule_tmp, TK_A_GROUP_ID, op, NULL, &gid);
1462 rule_add_key(&rule_tmp, TK_A_GROUP, op, value, NULL);
1464 rule_tmp.rule.rule.can_set_name = true;
1479 rule_add_key(&rule_tmp, TK_A_MODE_ID, op, NULL, &mode);
1481 rule_add_key(&rule_tmp, TK_A_MODE, op, value, NULL);
1482 rule_tmp.rule.rule.can_set_name = true;
1498 rule_add_key(&rule_tmp, TK_A_DEVLINK_PRIO, op, NULL, &prio);
1505 rule_add_key(&rule_tmp, TK_A_STRING_ESCAPE_NONE, op, NULL, NULL);
1507 rule_add_key(&rule_tmp, TK_A_STRING_ESCAPE_REPLACE, op, NULL, NULL);
1512 rule_add_key(&rule_tmp, TK_A_DB_PERSIST, op, NULL, NULL);
1518 rule_add_key(&rule_tmp, TK_A_INOTIFY_WATCH, op, NULL, &off);
1524 rule_add_key(&rule_tmp, TK_A_INOTIFY_WATCH, op, NULL, &on);
1530 rule_add_key(&rule_tmp, TK_A_STATIC_NODE, op, &pos[strlen("static_node=")], NULL);
1531 rule_tmp.rule.rule.has_static_node = true;
1542 rule_tmp.rule.rule.token_count = 1 + rule_tmp.token_cur;
1543 if (add_token(rules, &rule_tmp.rule) != 0)
1547 if (sort_token(rules, &rule_tmp) != 0)