chiark / gitweb /
persistent device naming: tape devices and medium changers
[elogind.git] / udev_db.c
index 797d0eeffbf4c036f3f64ada553e5fcafdde2020..b1217d80e1a79273b5ccf5a9077b5326444582aa 100644 (file)
--- a/udev_db.c
+++ b/udev_db.c
@@ -1,6 +1,4 @@
 /*
- * udev_db.c
- *
  * Copyright (C) 2003 Greg Kroah-Hartman <greg@kroah.com>
  * Copyright (C) 2004-2005 Kay Sievers <kay.sievers@vrfy.org>
  *
@@ -15,7 +13,7 @@
  * 
  *     You should have received a copy of the GNU General Public License along
  *     with this program; if not, write to the Free Software Foundation, Inc.,
- *     675 Mass Ave, Cambridge, MA 02139, USA.
+ *     51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  *
  */
 
@@ -95,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));