source: bootcd/isolinux/syslinux-6.03/core/fs/lib/loadconfig.c

Last change on this file was e16e8f2, checked in by Edwin Eefting <edwin@datux.nl>, 3 years ago

bootstuff

  • Property mode set to 100644
File size: 816 bytes
Line 
1#include <dprintf.h>
2#include <stdio.h>
3#include <string.h>
4#include <core.h>
5#include <fs.h>
6
7/*
8 * Standard version of load_config for extlinux/syslinux filesystems.
9 *
10 * This searches for extlinux.conf and syslinux.cfg in the install
11 * directory, followed by a set of fallback directories.  If found,
12 * set the current working directory to match.
13 */
14int generic_open_config(struct com32_filedata *filedata)
15{
16    static const char *search_directories[] = {
17        NULL,                   /* CurrentDirName */
18        "/boot/syslinux",
19        "/syslinux",
20        "/",
21        NULL
22    };
23    static const char *filenames[] = {
24        "extlinux.conf",
25        "syslinux.cfg",
26        NULL
27    };
28
29    search_directories[0] = CurrentDirName;
30
31    dprintf("CurrentDirName: \"%s\"\n", CurrentDirName);
32
33    return search_dirs(filedata, search_directories, filenames, ConfigName);
34}
Note: See TracBrowser for help on using the repository browser.