#include <errno.h>
#include "udev.h"
-#include "udev_lib.h"
+#include "udev_utils.h"
#include "logging.h"
#include "namedev.h"
dump_perm_dev(dev);
}
-/* extract possible KEY{attr} or KEY_attr */
+/* extract possible KEY{attr} */
static char *get_key_attribute(char *str)
{
char *pos;
return attr;
}
- attr = strchr(str, '_');
- if (attr != NULL) {
- attr++;
- dbg("attribute='%s'", attr);
- return attr;
- }
-
return NULL;
}
continue;
}
+ if (strcasecmp(temp2, FIELD_DRIVER) == 0) {
+ strfieldcpy(dev.driver, temp3);
+ valid = 1;
+ continue;
+ }
+
if (strcasecmp(temp2, FIELD_PROGRAM) == 0) {
program_given = 1;
strfieldcpy(dev.program, temp3);
if (strncasecmp(temp2, FIELD_NAME, sizeof(FIELD_NAME)-1) == 0) {
attr = get_key_attribute(temp2 + sizeof(FIELD_NAME)-1);
- if (attr != NULL && strcasecmp(attr, ATTR_PARTITIONS) == 0) {
+ if (attr != NULL) {
+ if (strstr(attr, ATTR_PARTITIONS) != NULL) {
dbg_parse("creation of partition nodes requested");
dev.partitions = PARTITIONS_COUNT;
}
+ if (strstr(attr, ATTR_IGNORE_REMOVE) != NULL) {
+ dbg_parse("remove event should be ignored");
+ dev.ignore_remove = 1;
+ }
+ }
strfieldcpy(dev.name, temp3);
valid = 1;
continue;