2007-08-28 Robert Millan <rmh@aybabtu.com>
* util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name() to tell grub-mkdevicemap how to name devices. * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a" feature). * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add util/i386/get_disk_name.c. * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise. * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add util/ieee1275/get_disk_name.c. * include/grub/util/misc.h: grub_util_get_disk_name() declaration. * DISTLIST: Add util/i386/get_disk_name.c and util/ieee1275/get_disk_name.c. * util/grub-mkdevicemap.c: Replace device naming logic with grub_util_get_disk_name() calls.
This commit is contained in:
parent
5a0d3cca6d
commit
29d0928cd7
7 changed files with 54 additions and 9 deletions
21
ChangeLog
21
ChangeLog
|
@ -1,3 +1,24 @@
|
|||
2007-08-28 Robert Millan <rmh@aybabtu.com>
|
||||
|
||||
* util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
|
||||
to tell grub-mkdevicemap how to name devices.
|
||||
* util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
|
||||
feature).
|
||||
|
||||
* conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
|
||||
util/i386/get_disk_name.c.
|
||||
* conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
|
||||
* conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
|
||||
util/ieee1275/get_disk_name.c.
|
||||
|
||||
* include/grub/util/misc.h: grub_util_get_disk_name() declaration.
|
||||
|
||||
* DISTLIST: Add util/i386/get_disk_name.c and
|
||||
util/ieee1275/get_disk_name.c.
|
||||
|
||||
* util/grub-mkdevicemap.c: Replace device naming logic with
|
||||
grub_util_get_disk_name() calls.
|
||||
|
||||
2007-08-20 Robert Millan <rmh@aybabtu.com>
|
||||
|
||||
* normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
|
||||
|
|
2
DISTLIST
2
DISTLIST
|
@ -285,11 +285,13 @@ util/grub.d/10_linux.in
|
|||
util/grub.d/README
|
||||
util/i386/efi/grub-install.in
|
||||
util/i386/efi/grub-mkimage.c
|
||||
util/i386/get_disk_name.c
|
||||
util/i386/pc/grub-install.in
|
||||
util/i386/pc/grub-mkimage.c
|
||||
util/i386/pc/grub-setup.c
|
||||
util/i386/pc/misc.c
|
||||
util/i386/pc/grub-mkrescue.in
|
||||
util/ieee1275/get_disk_name.c
|
||||
util/powerpc/ieee1275/grub-install.in
|
||||
util/powerpc/ieee1275/grub-mkimage.c
|
||||
util/powerpc/ieee1275/misc.c
|
||||
|
|
|
@ -24,7 +24,8 @@ grub_mkimage_SOURCES = util/i386/efi/grub-mkimage.c util/misc.c \
|
|||
# kern/fs.c kern/env.c fs/fshelp.c
|
||||
|
||||
# For grub-mkdevicemap.
|
||||
grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/misc.c
|
||||
grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/misc.c \
|
||||
util/i386/get_disk_name.c
|
||||
|
||||
# For grub-probe.
|
||||
grub_probe_DEPENDENCIES = grub_probe_init.h
|
||||
|
|
|
@ -72,7 +72,8 @@ grub_setup_SOURCES = util/i386/pc/grub-setup.c util/biosdisk.c \
|
|||
util/raid.c util/lvm.c grub_setup_init.c
|
||||
|
||||
# For grub-mkdevicemap.
|
||||
grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/misc.c
|
||||
grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/misc.c \
|
||||
util/i386/get_disk_name.c
|
||||
|
||||
# For grub-probe.
|
||||
grub_probe_DEPENDENCIES = grub_probe_init.h
|
||||
|
|
|
@ -36,7 +36,8 @@ grub_mkimage_SOURCES = util/powerpc/ieee1275/grub-mkimage.c util/misc.c \
|
|||
util/resolve.c
|
||||
|
||||
# For grub-mkdevicemap.
|
||||
grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/misc.c
|
||||
grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/misc.c \
|
||||
util/ieee1275/get_disk_name.c
|
||||
|
||||
# For grub-probe.
|
||||
grub_probe_DEPENDENCIES = grub_probe_init.h
|
||||
|
|
|
@ -53,5 +53,6 @@ void grub_util_load_image (const char *path, char *buf);
|
|||
void grub_util_write_image (const char *img, size_t size, FILE *out);
|
||||
void grub_util_write_image_at (const void *img, size_t size, off_t offset,
|
||||
FILE *out);
|
||||
char *grub_util_get_disk_name (int disk, char *name);
|
||||
|
||||
#endif /* ! GRUB_UTIL_MISC_HEADER */
|
||||
|
|
|
@ -402,8 +402,11 @@ make_device_map (const char *device_map, int floppy_disks)
|
|||
|
||||
if (realpath (discn, name))
|
||||
{
|
||||
char *p;
|
||||
strcat (name, "/disc");
|
||||
fprintf (fp, "(hd%d)\t%s\n", num_hd, name);
|
||||
p = grub_util_get_disk_name (num_hd, name);
|
||||
fprintf (fp, "(%s)\t%s\n", p, name);
|
||||
free (p);
|
||||
}
|
||||
|
||||
num_hd++;
|
||||
|
@ -421,7 +424,10 @@ make_device_map (const char *device_map, int floppy_disks)
|
|||
get_ide_disk_name (name, i);
|
||||
if (check_device (name))
|
||||
{
|
||||
fprintf (fp, "(hd%d)\t%s\n", num_hd, name);
|
||||
char *p;
|
||||
p = grub_util_get_disk_name (num_hd, name);
|
||||
fprintf (fp, "(%s)\t%s\n", p, name);
|
||||
free (p);
|
||||
num_hd++;
|
||||
}
|
||||
}
|
||||
|
@ -435,7 +441,10 @@ make_device_map (const char *device_map, int floppy_disks)
|
|||
get_ataraid_disk_name (name, i);
|
||||
if (check_device (name))
|
||||
{
|
||||
fprintf (fp, "(hd%d)\t%s\n", num_hd, name);
|
||||
char *p;
|
||||
p = grub_util_get_disk_name (num_hd, name);
|
||||
fprintf (fp, "(%s)\t%s\n", p, name);
|
||||
free (p);
|
||||
num_hd++;
|
||||
}
|
||||
}
|
||||
|
@ -449,7 +458,10 @@ make_device_map (const char *device_map, int floppy_disks)
|
|||
get_scsi_disk_name (name, i);
|
||||
if (check_device (name))
|
||||
{
|
||||
fprintf (fp, "(hd%d)\t%s\n", num_hd, name);
|
||||
char *p;
|
||||
p = grub_util_get_disk_name (num_hd, name);
|
||||
fprintf (fp, "(%s)\t%s\n", p, name);
|
||||
free (p);
|
||||
num_hd++;
|
||||
}
|
||||
}
|
||||
|
@ -472,7 +484,10 @@ make_device_map (const char *device_map, int floppy_disks)
|
|||
get_dac960_disk_name (name, controller, drive);
|
||||
if (check_device (name))
|
||||
{
|
||||
fprintf (fp, "(hd%d)\t%s\n", num_hd, name);
|
||||
char *p;
|
||||
p = grub_util_get_disk_name (num_hd, name);
|
||||
fprintf (fp, "(%s)\t%s\n", p, name);
|
||||
free (p);
|
||||
num_hd++;
|
||||
}
|
||||
}
|
||||
|
@ -490,7 +505,10 @@ make_device_map (const char *device_map, int floppy_disks)
|
|||
get_i2o_disk_name (name, unit);
|
||||
if (check_device (name))
|
||||
{
|
||||
fprintf (fp, "(hd%d)\t%s\n", num_hd, name);
|
||||
char *p;
|
||||
p = grub_util_get_disk_name (num_hd, name);
|
||||
fprintf (fp, "(%s)\t%s\n", p, name);
|
||||
free (p);
|
||||
num_hd++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue