mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-22 07:12:39 +00:00
2004-03-12 Yoshinori K. Okuji <okuji@enbug.org>
From Boji Tony Kannanthanam <boji.t.kannanthanam@intel.com>: * util/grub-install.in (convert): Add support for ATARAID device names. * lib/device.c (get_ataraid_disk_name) [__linux__]: New function. (init_device_map) [__linux__]: Probe ATARAID disks. * stage2/size_test (check): Don't use the local statement any longer. It was unneeded actually. Reported by Paul Jarc.
This commit is contained in:
1 parent
9b1392428c
commit
b42b9b7e22
7 files changed
+46
-5
No files matched your search
+28
-1
@@ -1,7 +1,7 @@
|
||||
/* device.c - Some helper functions for OS devices and BIOS drives */
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 1999,2000,2001,2002,2003 Free Software Foundation, Inc.
|
||||
* Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -361,6 +361,12 @@ get_dac960_disk_name (char *name, int controller, int drive)
|
||||
{
|
||||
sprintf (name, "/dev/rd/c%dd%d", controller, drive);
|
||||
}
|
||||
|
||||
static void
|
||||
get_ataraid_disk_name (char *name, int unit)
|
||||
{
|
||||
sprintf (name, "/dev/ataraid/d%c", unit + '0');
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Check if DEVICE can be read. If an error occurs, return zero,
|
||||
@@ -682,6 +688,27 @@ init_device_map (char ***map, const char *map_file, int floppy_disks)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __linux__
|
||||
/* ATARAID disks. */
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
char name[20];
|
||||
|
||||
get_ataraid_disk_name (name, i);
|
||||
if (check_device (name))
|
||||
{
|
||||
(*map)[num_hd + 0x80] = strdup (name);
|
||||
assert ((*map)[num_hd + 0x80]);
|
||||
|
||||
/* If the device map file is opened, write the map. */
|
||||
if (fp)
|
||||
fprintf (fp, "(hd%d)\t%s\n", num_hd, name);
|
||||
|
||||
num_hd++;
|
||||
}
|
||||
}
|
||||
#endif /* __linux__ */
|
||||
|
||||
/* The rest is SCSI disks. */
|
||||
for (i = 0; i < 16; i++)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user