1 |
/* main.c - experimental GRUB stage2 that runs under Unix */ |
/* main.c - experimental GRUB stage2 that runs under Unix */ |
2 |
/* |
/* |
3 |
* GRUB -- GRand Unified Bootloader |
* GRUB -- GRand Unified Bootloader |
4 |
* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. |
* Copyright (C) 1999,2000,2001,2002 Free Software Foundation, Inc. |
5 |
* |
* |
6 |
* This program is free software; you can redistribute it and/or modify |
* This program is free software; you can redistribute it and/or modify |
7 |
* it under the terms of the GNU General Public License as published by |
* it under the terms of the GNU General Public License as published by |
63 |
#define OPT_NO_FLOPPY -14 |
#define OPT_NO_FLOPPY -14 |
64 |
#define OPT_DEVICE_MAP -15 |
#define OPT_DEVICE_MAP -15 |
65 |
#define OPT_PRESET_MENU -16 |
#define OPT_PRESET_MENU -16 |
66 |
|
#define OPT_NO_PAGER -17 |
67 |
#define OPTSTRING "" |
#define OPTSTRING "" |
68 |
|
|
69 |
static struct option longopts[] = |
static struct option longopts[] = |
78 |
{"no-config-file", no_argument, 0, OPT_NO_CONFIG_FILE}, |
{"no-config-file", no_argument, 0, OPT_NO_CONFIG_FILE}, |
79 |
{"no-curses", no_argument, 0, OPT_NO_CURSES}, |
{"no-curses", no_argument, 0, OPT_NO_CURSES}, |
80 |
{"no-floppy", no_argument, 0, OPT_NO_FLOPPY}, |
{"no-floppy", no_argument, 0, OPT_NO_FLOPPY}, |
81 |
|
{"no-pager", no_argument, 0, OPT_NO_PAGER}, |
82 |
{"preset-menu", no_argument, 0, OPT_PRESET_MENU}, |
{"preset-menu", no_argument, 0, OPT_PRESET_MENU}, |
83 |
{"probe-second-floppy", no_argument, 0, OPT_PROBE_SECOND_FLOPPY}, |
{"probe-second-floppy", no_argument, 0, OPT_PROBE_SECOND_FLOPPY}, |
84 |
{"read-only", no_argument, 0, OPT_READ_ONLY}, |
{"read-only", no_argument, 0, OPT_READ_ONLY}, |
109 |
--no-config-file do not use the config file\n\ |
--no-config-file do not use the config file\n\ |
110 |
--no-curses do not use curses\n\ |
--no-curses do not use curses\n\ |
111 |
--no-floppy do not probe any floppy drive\n\ |
--no-floppy do not probe any floppy drive\n\ |
112 |
|
--no-pager do not use internal pager\n\ |
113 |
--preset-menu use the preset menu\n\ |
--preset-menu use the preset menu\n\ |
114 |
--probe-second-floppy probe the second floppy drive\n\ |
--probe-second-floppy probe the second floppy drive\n\ |
115 |
--read-only do not write anything to devices\n\ |
--read-only do not write anything to devices\n\ |
201 |
use_curses = 0; |
use_curses = 0; |
202 |
break; |
break; |
203 |
|
|
204 |
|
case OPT_NO_PAGER: |
205 |
|
use_pager = 0; |
206 |
|
break; |
207 |
|
|
208 |
case OPT_BATCH: |
case OPT_BATCH: |
209 |
/* This is the same as "--no-config-file --no-curses". */ |
/* This is the same as "--no-config-file --no-curses --no-pager". */ |
210 |
use_config_file = 0; |
use_config_file = 0; |
211 |
use_curses = 0; |
use_curses = 0; |
212 |
|
use_pager = 0; |
213 |
break; |
break; |
214 |
|
|
215 |
case OPT_READ_ONLY: |
case OPT_READ_ONLY: |