void keyfile_read(lopts_t lopts) { gchar *rcpath, **dirs, *p; const gchar *v; gint i; v = g_getenv("QUVI_SHOW_CONFIG"); show_config = (v != NULL && strlen(v) >0) ? TRUE:FALSE; if (lopts->cb.get_config_fpath != NULL) { p = lopts->cb.get_config_fpath(); if (p != NULL) /* QUVI_CONFIG was defined. */ { _keyfile_parse(lopts, p); g_free(p); return; } } rcpath = g_build_path(G_DIR_SEPARATOR_S, "quvi", "quvirc", NULL); dirs = search_dirs(); i = 0; while (dirs[i] != NULL) { p = g_build_path(G_DIR_SEPARATOR_S, dirs[i++], rcpath, NULL); _keyfile_parse(lopts, p); g_free(p); } }
/* * Standard version of load_config for extlinux/syslinux filesystems. * * This searches for extlinux.conf and syslinux.cfg in the install * directory, followed by a set of fallback directories. If found, * set the current working directory to match. */ int generic_open_config(struct com32_filedata *filedata) { static const char *search_directories[] = { NULL, /* CurrentDirName */ "/boot/syslinux", "/syslinux", "/", NULL }; static const char *filenames[] = { "extlinux.conf", "syslinux.cfg", NULL }; search_directories[0] = CurrentDirName; dprintf("CurrentDirName: \"%s\"\n", CurrentDirName); return search_dirs(filedata, search_directories, filenames, ConfigName); }
void get_standard_libpaths (rld::path::paths& libpaths) { search_dirs (); rld::split (libpaths, libraries_path, RLD_PATHSTR_SEPARATOR); }