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] fix test for temporary nodes
[elogind.git]
/
namedev_parse.c
diff --git
a/namedev_parse.c
b/namedev_parse.c
index 3b14a6a50051a10e774b47f0dbbb5c0d8c311022..7b5b963020275eb181c168217044e62593f2cbd5 100644
(file)
--- a/
namedev_parse.c
+++ b/
namedev_parse.c
@@
-126,7
+126,7
@@
static int namedev_parse(const char *filename, void *data)
cur = 0;
lineno = 0;
while (cur < bufsize) {
cur = 0;
lineno = 0;
while (cur < bufsize) {
- int i, j;
+
unsigned
int i, j;
count = buf_get_line(buf, bufsize, cur);
bufline = &buf[cur];
count = buf_get_line(buf, bufsize, cur);
bufline = &buf[cur];
@@
-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);
+ }
+}
+