chiark / gitweb /
[PATCH] make the release tarballs have writable files in them.
[elogind.git] / namedev_parse.c
index 3b14a6a50051a10e774b47f0dbbb5c0d8c311022..7b5b963020275eb181c168217044e62593f2cbd5 100644 (file)
@@ -126,7 +126,7 @@ static int namedev_parse(const char *filename, void *data)
        cur = 0;
        lineno = 0;
        while (cur < bufsize) {
-               int i, j;
+               unsigned int i, j;
 
                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");
-                                               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);
+       }
+}
+