fix: generated udev rules does not work due to incorrect line format

Problem consists of missing =sign in comparison with SUBSYSTEM and
missing new line character at the end of line. As a result incremental
for hot-plugs of bare disks does not work.

Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
Hawrylewicz Czarnowski, Przemyslaw 2011-03-08 09:51:31 +11:00 committed by NeilBrown
parent 588bebfcc2
commit c8826c3e47
1 changed files with 4 additions and 4 deletions

View File

@ -786,14 +786,14 @@ char *find_rule(struct rule *rule, char *rule_type)
}
#define UDEV_RULE_FORMAT \
"ACTION==\"add\", SUBSYSTEM=\"block\", " \
"ACTION==\"add\", SUBSYSTEM==\"block\", " \
"ENV{DEVTYPE}==\"%s\", ENV{ID_PATH}==\"%s\", " \
"RUN+=\"/sbin/mdadm --incremental $env{DEVNAME}\", "
"RUN+=\"/sbin/mdadm --incremental $env{DEVNAME}\"\n"
#define UDEV_RULE_FORMAT_NOTYPE \
"ACTION==\"add\", SUBSYSTEM=\"block\", " \
"ACTION==\"add\", SUBSYSTEM==\"block\", " \
"ENV{ID_PATH}==\"%s\", " \
"RUN+=\"/sbin/mdadm --incremental $env{DEVNAME}\", "
"RUN+=\"/sbin/mdadm --incremental $env{DEVNAME}\"\n"
/* Write rule in the rule file. Use format from UDEV_RULE_FORMAT */
int write_rule(struct rule *rule, int fd, int force_part)