Skip to content
This repository has been archived by the owner on Sep 18, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
	* loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
	function.
	(grub_multiboot_load_elf32): Likewise.
	(grub_multiboot_is_elf64): Likewise.
	(grub_multiboot_load_elf64): Likewise.
	(grub_multiboot_load_elf): Likewise.
	(grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
	an ELF32 or ELF64 file.
	This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.

	From Serbinenko Vladimir <serbinenko.vova@list.ru>:
	* kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
	NULL before calling FS->LABEL.
	* fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
	* commands/ls.c (grub_ls_list_files): Show labels, if possible.
	(grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
	before calling FS->LABEL.
  • Loading branch information
okuji committed Jul 31, 2005
1 parent 141a288 commit ea40971
Show file tree
Hide file tree
Showing 6 changed files with 222 additions and 85 deletions.
20 changes: 20 additions & 0 deletions ChangeLog
@@ -1,3 +1,23 @@
2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>

* loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
function.
(grub_multiboot_load_elf32): Likewise.
(grub_multiboot_is_elf64): Likewise.
(grub_multiboot_load_elf64): Likewise.
(grub_multiboot_load_elf): Likewise.
(grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
an ELF32 or ELF64 file.
This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.

From Serbinenko Vladimir <serbinenko.vova@list.ru>:
* kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
NULL before calling FS->LABEL.
* fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
* commands/ls.c (grub_ls_list_files): Show labels, if possible.
(grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
before calling FS->LABEL.

2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>

* util/i386/pc/grub-install.in (datadir): New variable.
Expand Down
2 changes: 2 additions & 0 deletions THANKS
Expand Up @@ -13,6 +13,8 @@ Hollis Blanchard <hollis@penguinppc.org>
Marco Gerards <metgerards@student.han.nl>
NIIBE Yutaka <gniibe@m17n.org>
Robert Bihlmeyer <robbe@orcus.priv.at>
Ruslan Nikolaev <nruslan@mail.com>
Serbinenko Vladimir <serbinenko.vova@list.ru>
Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
Tomas Ebenlendr <ebik@ucw.cz>
Tsuneyoshi Yasuo <tuneyoshi@naic.co.jp>
Expand Down
40 changes: 30 additions & 10 deletions commands/ls.c
Expand Up @@ -83,17 +83,20 @@ grub_ls_list_disks (int longlist)
grub_errno = GRUB_ERR_NONE;

grub_printf (", Filesystem type %s",
fs ? fs->name : "Unknown");

(fs->label) (dev, &label);
if (grub_errno == GRUB_ERR_NONE)
fs ? fs->name : "unknown");

if (fs && fs->label)
{
if (label && grub_strlen (label))
grub_printf (", Label: %s", label);
grub_free (label);
(fs->label) (dev, &label);
if (grub_errno == GRUB_ERR_NONE)
{
if (label && grub_strlen (label))
grub_printf (", Label: %s", label);
grub_free (label);
}
else
grub_errno = GRUB_ERR_NONE;
}
else
grub_errno = GRUB_ERR_NONE;
}

grub_putchar ('\n');
Expand Down Expand Up @@ -221,8 +224,25 @@ grub_ls_list_files (char *dirname, int longlist, int all, int human)
if (grub_errno == GRUB_ERR_UNKNOWN_FS)
grub_errno = GRUB_ERR_NONE;

grub_printf ("(%s): Filesystem is %s.\n",
grub_printf ("(%s): Filesystem is %s",
device_name, fs ? fs->name : "unknown");

if (fs && fs->label)
{
char *label;

(fs->label) (dev, &label);
if (grub_errno == GRUB_ERR_NONE)
{
if (label && grub_strlen (label))
grub_printf (", Label: %s", label);
grub_free (label);
}
else
grub_errno = GRUB_ERR_NONE;
}

grub_putchar ('\n');
}
else if (fs)
{
Expand Down
2 changes: 1 addition & 1 deletion fs/fat.c
Expand Up @@ -629,7 +629,7 @@ grub_fat_dir (grub_device_t device, const char *path,
struct grub_fat_data *data = 0;
grub_disk_t disk = device->disk;
grub_size_t len;
char *dirname;
char *dirname = 0;
char *p;

#ifndef GRUB_UTIL
Expand Down
2 changes: 1 addition & 1 deletion kern/disk.c
Expand Up @@ -535,7 +535,7 @@ grub_print_partinfo (grub_device_t disk, char *partname)
grub_printf ("\tPartition num:%s, Filesystem type %s",
partname, fs ? fs->name : "Unknown");

if (fs)
if (fs && fs->label)
{
(fs->label) (part, &label);
if (grub_errno == GRUB_ERR_NONE)
Expand Down

0 comments on commit ea40971

Please sign in to comment.