size_t key_len = strnlen(key, PATH_SIZE);
if (pairs->count >= PAIRS_MAX) {
- err("skip, too many keys in a single rule");
+ err("skip, too many keys of the same type in a single rule");
return -1;
}
}
if (strncasecmp(key, "ATTR", sizeof("ATTR")-1) == 0) {
- if (operation != KEY_OP_MATCH &&
- operation != KEY_OP_NOMATCH) {
- err("invalid ATTR operation");
- goto invalid;
- }
attr = get_key_attribute(key + sizeof("ATTR")-1);
if (attr == NULL) {
err("error parsing ATTR attribute");
if (strncasecmp(key, "ATTRS", sizeof("ATTRS")-1) == 0 ||
strncasecmp(key, "SYSFS", sizeof("SYSFS")-1) == 0) {
- if (operation != KEY_OP_MATCH &&
- operation != KEY_OP_NOMATCH) {
- err("invalid ATTRSS operation");
- goto invalid;
- }
attr = get_key_attribute(key + sizeof("ATTRS")-1);
if (attr == NULL) {
err("error parsing ATTRS attribute");