chiark / gitweb /
fix %c $string substitution
[elogind.git] / udev_db.c
index f3c9509dcc8767c592af4ce17a0a010eca94143b..b1217d80e1a79273b5ccf5a9077b5326444582aa 100644 (file)
--- a/udev_db.c
+++ b/udev_db.c
@@ -93,6 +93,7 @@ int udev_db_add_device(struct udevice *udev)
                struct name_entry *name_loop;
                FILE *f;
 
+               unlink(filename);
                f = fopen(filename, "w");
                if (f == NULL) {
                        err("unable to create db file '%s': %s", filename, strerror(errno));