X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=udev_db.c;h=b1217d80e1a79273b5ccf5a9077b5326444582aa;hb=5edec024b1ed7bbdf73095791c13df324038c31d;hp=f3c9509dcc8767c592af4ce17a0a010eca94143b;hpb=27b77df44daebbd7597c572343105c16de099233;p=elogind.git diff --git a/udev_db.c b/udev_db.c index f3c9509dc..b1217d80e 100644 --- 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));