subsys => "block",
devpath => "/block/sda/sda1",
exp_name => "start-udev-root-end",
- option => "clean",
conf => <<EOF
BUS="scsi", KERNEL="sda1", NAME="start-%r-end"
+EOF
+ },
+ {
+ desc => "last_rule option",
+ subsys => "block",
+ devpath => "/block/sda/sda1",
+ exp_name => "last",
+ conf => <<EOF
+BUS="scsi", KERNEL="sda1", SYMLINK="last", OPTIONS="last_rule"
+BUS="scsi", KERNEL="sda1", NAME="very-last"
EOF
},
);
break;
}
+
+ if (rule->last_rule) {
+ dbg("last rule to be applied");
+ break;
+ }
+
}
}
#define FIELD_MODE "MODE"
#define FIELD_OPTIONS "OPTIONS"
+#define OPTION_LAST_RULE "last_rule"
#define OPTION_IGNORE_DEVICE "ignore_device"
#define OPTION_IGNORE_REMOVE "ignore_remove"
#define OPTION_PARTITIONS "all_partitions"
char group[USER_SIZE];
mode_t mode;
- int partitions;
+ int last_rule;
int ignore_device;
int ignore_remove;
+ int partitions;
char config_file[PATH_SIZE];
int config_line;
}
if (strcasecmp(temp2, FIELD_OPTIONS) == 0) {
+ if (strstr(temp3, OPTION_LAST_RULE) != NULL) {
+ dbg("last rule to be applied");
+ rule.last_rule = 1;
+ }
if (strstr(temp3, OPTION_IGNORE_DEVICE) != NULL) {
dbg("device should be ignored");
rule.ignore_device = 1;