diff options
author | Sergey Vlasov <vsu@altlinux.ru> | 2007-01-23 19:55:38 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2007-01-23 19:55:38 +0100 |
commit | e0c0807ab32fde7f55776e0a300016bad922e636 (patch) | |
tree | 117c38653de162d7f6e31a5b75333d1c6a21442e /udevd.h | |
parent | 27283c2fdaefd9c7fd557fd4663566eacccca33a (diff) |
unlink old database file before creating a new one
udev_db_add_device() can be called when the corressponding database
entry already exists - it should overwrite the old entry in this case.
However, if the old entry was a symlink, fopen(filename, "w") will not
overwrite it properly - it will keep the symlink and create a file
named after the symlink target. Calling unlink(filename) before
trying to create the database file fixes the problem.
Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Diffstat (limited to 'udevd.h')
0 files changed, 0 insertions, 0 deletions