Adding upstream version 4.00~pre61+dfsg.
[syslinux-debian/hramrach.git] / com32 / modules / config.c
blobfb6cb867db22de71bcaa3adbd768fe22a870aacf
1 /* ----------------------------------------------------------------------- *
3 * Copyright 2009 H. Peter Anvin - All Rights Reserved
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 * config.c
16 * Loads a new configuration file
18 * Usage: config filename
21 #include <stdio.h>
22 #include <console.h>
23 #include <syslinux/boot.h>
25 int main(int argc, char *argv[])
27 openconsole(&dev_null_r, &dev_stdcon_w);
29 if (argc != 2) {
30 fprintf(stderr, "Usage: config <filename>\n");
31 return 1;
34 syslinux_run_kernel_image(argv[1], "", 0, IMAGE_TYPE_CONFIG);
36 fprintf(stderr, "config: %s: failed to load (missing file?)\n", argv[1]);
37 return 1;