+ if (msg->devpath_old != NULL) {
+ /* "move" event - rename failed file to current name, do not delete failed */
+ char filename_failed_old[PATH_SIZE];
+
+ strlcpy(filename_failed_old, udev_root, sizeof(filename_failed_old));
+ strlcat(filename_failed_old, "/", sizeof(filename_failed_old));
+ start = strlcat(filename_failed_old, EVENT_FAILED_DIR"/", sizeof(filename_failed_old));
+ strlcat(filename_failed_old, msg->devpath_old, sizeof(filename_failed_old));
+ path_encode(&filename_failed_old[start], sizeof(filename) - start);
+
+ if (rename(filename_failed_old, filename_failed) == 0)
+ info("renamed devpath, moved failed state of '%s' to %s'",
+ msg->devpath_old, msg->devpath);
+ } else {
+ unlink(filename_failed);
+ delete_path(filename_failed);
+ }