Releasing debian version 4.04+dfsg-9.
[syslinux-debian/hramrach.git] / core / fs / newconfig.c
blob58c47a51f34e2fe847913411776b98115cfdc7b1
1 /* ----------------------------------------------------------------------- *
3 * Copyright 2010 Intel Corporation; author: H. Peter Anvin
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
8 * Boston MA 02110-1301, USA; either version 2 of the License, or
9 * (at your option) any later version; incorporated herein by reference.
11 * ----------------------------------------------------------------------- */
14 * newconfig.c
16 * Load a new configuration file
19 #include "core.h"
20 #include "fs.h"
22 void pm_is_config_file(com32sys_t *regs)
24 char target_cwd[FILENAME_MAX];
25 const char *p;
27 (void)regs;
29 /* Save configuration file as an absolute path for posterity */
30 realpath(ConfigName, KernelName, FILENAME_MAX);
32 /* If we got anything on the command line, do a chdir */
33 p = cmd_line;
34 while (*p && !not_whitespace(*p))
35 p++;
37 if (*p) {
38 mangle_name(target_cwd, p);
39 chdir(target_cwd);