chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] create /block/*/range count of partitons for all_partitions
[elogind.git]
/
namedev_parse.c
diff --git
a/namedev_parse.c
b/namedev_parse.c
index 5bd59d83f230ea2113bacb48ccf25efbe86c2c06..7b5b963020275eb181c168217044e62593f2cbd5 100644
(file)
--- a/
namedev_parse.c
+++ b/
namedev_parse.c
@@
-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");
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");
}
if (strstr(attr, ATTR_IGNORE_REMOVE) != NULL) {
dbg_parse("remove event should be ignored");
@@
-338,3
+338,14
@@
int namedev_init(void)
return retval;
}
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);
+ }
+}
+