summaryrefslogtreecommitdiff
path: root/udev_db.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2007-08-26 05:22:35 +0200
committerKay Sievers <kay.sievers@vrfy.org>2007-08-26 05:22:35 +0200
commita2f2270eef499f6f60075a149011e3e3851ab5ef (patch)
tree5e84f73d692a9e9b6cc679c29112f2f97ce39e84 /udev_db.c
parent3f781cab37dbee76340c65602555a524ffea96f9 (diff)
track "move" events to rename database and failed files
Diffstat (limited to 'udev_db.c')
-rw-r--r--udev_db.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/udev_db.c b/udev_db.c
index abc1e5ad5a..29aa0316d2 100644
--- a/udev_db.c
+++ b/udev_db.c
@@ -117,6 +117,16 @@ out:
return rc;
}
+int udev_db_rename(const char *devpath_old, const char *devpath)
+{
+ char filename[PATH_SIZE];
+ char filename_old[PATH_SIZE];
+
+ devpath_to_db_path(devpath_old, filename_old, sizeof(filename_old));
+ devpath_to_db_path(devpath, filename, sizeof(filename));
+ return rename(filename_old, filename);
+}
+
int udev_db_add_device(struct udevice *udev)
{
char filename[PATH_SIZE];