/* search.c - search devices based on a file or a filesystem label */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2005,2007,2008,2009 Free Software Foundation, Inc.
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GRUB is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
GRUB_MOD_LICENSE ("GPLv3+");
{
0, 0},
0, 0},
N_("First try the device HINT. If HINT ends in comma, "
{"hint-ieee1275", 0, GRUB_ARG_OPTION_REPEATABLE,
N_("First try the device HINT if on IEEE1275. If HINT ends in comma, "
{"hint-bios", 0, GRUB_ARG_OPTION_REPEATABLE,
N_("First try the device HINT if on BIOS. If HINT ends in comma, "
{"hint-baremetal", 0, GRUB_ARG_OPTION_REPEATABLE,
N_("First try the device HINT. If HINT ends in comma, "
{"hint-efi", 0, GRUB_ARG_OPTION_REPEATABLE,
N_("First try the device HINT if on EFI. If HINT ends in comma, "
{"hint-arc", 0, GRUB_ARG_OPTION_REPEATABLE,
N_("First try the device HINT if on ARC. If HINT ends in comma, "
{0, 0, 0, 0, 0, 0}
};
enum options
{
};
static grub_err_t
{
const char *var = 0;
int i = 0, j = 0, nhints = 0;
nhints++;
#ifdef GRUB_MACHINE_IEEE1275
nhints++;
#endif
#ifdef GRUB_MACHINE_EFI
nhints++;
#endif
#ifdef GRUB_MACHINE_PCBIOS
nhints++;
#endif
#ifdef GRUB_MACHINE_ARC
nhints++;
#endif
nhints++;
if (!hints)
return grub_errno;
j = 0;
#ifdef GRUB_MACHINE_IEEE1275
#endif
#ifdef GRUB_MACHINE_EFI
#endif
#ifdef GRUB_MACHINE_ARC
#endif
#ifdef GRUB_MACHINE_PCBIOS
#endif
/* Skip hints for future platforms. */
for (j = 0; j < argc; j++)
break;
if (argc == j)
else
return grub_errno;
}
{
cmd =
N_("[-f|-l|-u|-s|-n] [--hint HINT [--hint HINT] ...]"
" NAME"),
N_("Search devices by file, filesystem label"
" or filesystem UUID."
" If --set is specified, the first device found is"
" set to a variable. If no variable name is"
" specified, \"root\" is used."),
options);
}
{
}