+static int db_file_to_devpath(const char *filename, char *devpath, size_t len)
+{
+ size_t end, i;
+
+ strlcpy(devpath, "/", len);
+ end = strlcat(devpath, filename, len);
+
+ /* replace PATH_TO_NAME_CHAR to transform name into devpath */
+ for (i = 1; i < end; i++)
+ if (devpath[i] == PATH_TO_NAME_CHAR)
+ devpath[i] = '/';
+
+ return 0;
+}
+