VIR_FORCE_CLOSE(fd);
}
+static void
+make_dir(const char *path,
+ const char *name)
+{
+ VIR_AUTOFREE(char *) dirpath = NULL;
+
+ if (virAsprintfQuiet(&dirpath, "%s/%s", path, name) < 0)
+ ABORT_OOM();
+
+ if (virFileMakePath(dirpath) < 0)
+ ABORT("Unable to create: %s", dirpath);
+}
+
static void
make_symlink(const char *path,
const char *name,
if (virFileMakePath(tmp) < 0)
ABORT("Unable to create: %s", tmp);
+ make_dir(tmp, "devices");
+ make_dir(tmp, "drivers");
make_file(tmp, "drivers_probe", NULL, -1);
# define MAKE_PCI_DRIVER(name, ...) \