diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2007-08-26 05:22:35 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2007-08-26 05:22:35 +0200 |
commit | a2f2270eef499f6f60075a149011e3e3851ab5ef (patch) | |
tree | 5e84f73d692a9e9b6cc679c29112f2f97ce39e84 /udev_db.c | |
parent | 3f781cab37dbee76340c65602555a524ffea96f9 (diff) |
track "move" events to rename database and failed files
Diffstat (limited to 'udev_db.c')
-rw-r--r-- | udev_db.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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]; |