summaryrefslogtreecommitdiff
path: root/udev_db.c
diff options
context:
space:
mode:
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];