summaryrefslogtreecommitdiff
path: root/udev/udev-rules.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2010-04-13 08:52:48 +0200
committerKay Sievers <kay.sievers@vrfy.org>2010-04-13 08:52:48 +0200
commit1f084fe5811ce251d516a8022f8c7c27d0ef1f53 (patch)
treeee6820255a29c135a37895304e22d9bf889dc83f /udev/udev-rules.c
parent236fae6cf1a619a92174efdf84cd7d91e7d4348d (diff)
remove "all_partitions" option
We can not predict the major/minor of non-existing devices: $ grep . /sys/class/block/sd*/dev /sys/class/block/sda1/dev:259:524288 /sys/class/block/sda2/dev:259:262144 /sys/class/block/sda3/dev:259:786432 /sys/class/block/sda4/dev:259:131072 /sys/class/block/sda/dev:259:0 /sys/class/block/sdb/dev:259:655360 /sys/class/block/sdc/dev:259:393216 If this functionality is still needed for some broken hardware, it needs to be solved with a tool not part of the udev package. Because such option is unreliable and unsafe to use.
Diffstat (limited to 'udev/udev-rules.c')
-rw-r--r--udev/udev-rules.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/udev/udev-rules.c b/udev/udev-rules.c
index 0361f689d5..a4a86b664a 100644
--- a/udev/udev-rules.c
+++ b/udev/udev-rules.c
@@ -196,7 +196,6 @@ struct token {
mode_t mode;
uid_t uid;
gid_t gid;
- int num_fake_part;
int devlink_prio;
int event_timeout;
int watch;
@@ -371,9 +370,6 @@ static void dump_token(struct udev_rules *rules, struct token *token)
case TK_A_INOTIFY_WATCH:
dbg(rules->udev, "%s %u\n", token_str(type), token->key.watch);
break;
- case TK_A_NUM_FAKE_PART:
- dbg(rules->udev, "%s %u\n", token_str(type), token->key.num_fake_part);
- break;
case TK_A_DEVLINK_PRIO:
dbg(rules->udev, "%s %s %u\n", token_str(type), operation_str(op), token->key.devlink_prio);
break;
@@ -1469,12 +1465,6 @@ static int add_rule(struct udev_rules *rules, char *line,
rule_add_key(&rule_tmp, TK_A_NAME, op, value, NULL);
attr = get_key_attribute(rules->udev, key + sizeof("NAME")-1);
if (attr != NULL) {
- if (strstr(attr, "all_partitions") != NULL) {
- int num = DEFAULT_FAKE_PARTITIONS_COUNT;
-
- dbg(rules->udev, "creation of partition nodes requested\n");
- rule_add_key(&rule_tmp, TK_A_NUM_FAKE_PART, 0, NULL, &num);
- }
if (strstr(attr, "ignore_remove") != NULL) {
dbg(rules->udev, "remove event should be ignored\n");
rule_add_key(&rule_tmp, TK_A_IGNORE_REMOVE, 0, NULL, NULL);
@@ -1576,12 +1566,6 @@ static int add_rule(struct udev_rules *rules, char *line,
else if (strncmp(pos, "replace", strlen("replace")) == 0)
rule_add_key(&rule_tmp, TK_A_STRING_ESCAPE_REPLACE, 0, NULL, NULL);
}
- if (strstr(value, "all_partitions") != NULL) {
- int num = DEFAULT_FAKE_PARTITIONS_COUNT;
-
- rule_add_key(&rule_tmp, TK_A_NUM_FAKE_PART, 0, NULL, &num);
- dbg(rules->udev, "creation of partition nodes requested\n");
- }
pos = strstr(value, "nowatch");
if (pos != NULL) {
const int off = 0;
@@ -2331,13 +2315,6 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event
case TK_A_STRING_ESCAPE_REPLACE:
esc = ESCAPE_REPLACE;
break;
- case TK_A_NUM_FAKE_PART:
- if (strcmp(udev_device_get_subsystem(event->dev), "block") != 0)
- break;
- if (udev_device_get_sysnum(event->dev) != NULL)
- break;
- udev_device_set_num_fake_partitions(event->dev, cur->key.num_fake_part);
- break;
case TK_A_INOTIFY_WATCH:
event->inotify_watch = cur->key.watch;
break;