static int virStorageDriverLoadBackendModule(const char *name, const char *regfunc, bool forceload) { VIR_AUTOFREE(char *) modfile = NULL; if (!(modfile = virFileFindResourceFull(name, "libvirt_storage_backend_", ".so", abs_top_builddir "/src/.libs", STORAGE_BACKEND_MODULE_DIR, "LIBVIRT_STORAGE_BACKEND_DIR"))) return -1; return virModuleLoad(modfile, regfunc, forceload); }
static int virStorageFileLoadBackendModule(const char *name, const char *regfunc, bool forceload) { char *modfile = NULL; int ret; if (!(modfile = virFileFindResourceFull(name, "libvirt_storage_file_", ".so", abs_topbuilddir "/src/.libs", STORAGE_FILE_MODULE_DIR, "LIBVIRT_STORAGE_FILE_DIR"))) return -1; ret = virModuleLoad(modfile, regfunc, forceload); VIR_FREE(modfile); return ret; }