chiark / gitweb /
[PATCH] create /block/*/range count of partitons for all_partitions
[elogind.git] / namedev_parse.c
index 5bd59d83f230ea2113bacb48ccf25efbe86c2c06..7b5b963020275eb181c168217044e62593f2cbd5 100644 (file)
@@ -250,7 +250,7 @@ static int namedev_parse(const char *filename, void *data)
                                if (attr != NULL) {
                                        if (strstr(attr, ATTR_PARTITIONS) != NULL) {
                                                dbg_parse("creation of partition nodes requested");
-                                               dev.partitions = PARTITIONS_COUNT;
+                                               dev.partitions = DEFAULT_PARTITIONS_COUNT;
                                        }
                                        if (strstr(attr, ATTR_IGNORE_REMOVE) != NULL) {
                                                dbg_parse("remove event should be ignored");
@@ -338,3 +338,14 @@ int namedev_init(void)
 
        return retval;
 }
+
+void namedev_close(void)
+{
+       struct config_device *dev;
+
+       list_for_each_entry(dev, &config_device_list, node) {
+               list_del(&dev->node);
+               free(dev);
+       }
+}
+