2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
* disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
This commit is contained in:
parent
e3741a2734
commit
8b8cbdb2ff
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
|
||||||
|
|
||||||
|
* disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
|
||||||
|
`devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
|
||||||
|
|
||||||
2005-01-22 Marco Gerards <metgerards@student.han.nl>
|
2005-01-22 Marco Gerards <metgerards@student.han.nl>
|
||||||
|
|
||||||
* kern/misc.c (grub_strndup): Function rewritten.
|
* kern/misc.c (grub_strndup): Function rewritten.
|
||||||
|
|
|
@ -50,12 +50,12 @@ grub_ofdisk_open (const char *name, grub_disk_t disk)
|
||||||
{
|
{
|
||||||
grub_ieee1275_phandle_t dev;
|
grub_ieee1275_phandle_t dev;
|
||||||
grub_ieee1275_ihandle_t dev_ihandle = 0;
|
grub_ieee1275_ihandle_t dev_ihandle = 0;
|
||||||
char *devpath = 0;
|
char *devpath;
|
||||||
/* XXX: This should be large enough for any possible case. */
|
/* XXX: This should be large enough for any possible case. */
|
||||||
char prop[64];
|
char prop[64];
|
||||||
int actual;
|
int actual;
|
||||||
|
|
||||||
devpath = grub_strndup (name, grub_strlen (devpath) + 2);
|
devpath = grub_strndup (name, grub_strlen (name) + 2);
|
||||||
if (! devpath)
|
if (! devpath)
|
||||||
return grub_errno;
|
return grub_errno;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue