2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
Each disk device has its own id now. This is useful to make use of multiple disk devices. * include/grub/disk.h (grub_disk_dev_id): New enum. (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant. (GRUB_DISK_DEVICE_OFDISK_ID): Likewise. * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify GRUB_DISK_DEVICE_BIOSDISK_ID as an id. * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify GRUB_DISK_DEVICE_OFDISK_ID as an id. * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify GRUB_DISK_DEVICE_BIOSDISK_ID as an id. * include/grub/disk.h (struct grub_disk_dev): Added a new member "id" which is used by the cache manager. * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead of just "GRUB".
This commit is contained in:
parent
64372eb442
commit
97543f08fc
7 changed files with 77 additions and 27 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
|
||||
* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -25,6 +25,14 @@
|
|||
#include <grub/types.h>
|
||||
#include <grub/device.h>
|
||||
|
||||
/* These are used to set a device id. When you add a new disk device,
|
||||
you must define a new id for it here. */
|
||||
enum grub_disk_dev_id
|
||||
{
|
||||
GRUB_DISK_DEVICE_BIOSDISK_ID,
|
||||
GRUB_DISK_DEVICE_OFDISK_ID,
|
||||
};
|
||||
|
||||
struct grub_disk;
|
||||
|
||||
/* Disk device. */
|
||||
|
@ -33,6 +41,9 @@ struct grub_disk_dev
|
|||
/* The device name. */
|
||||
const char *name;
|
||||
|
||||
/* The device id used by the cache manager. */
|
||||
unsigned long id;
|
||||
|
||||
/* Call HOOK with each device name, until HOOK returns non-zero. */
|
||||
int (*iterate) (int (*hook) (const char *name));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue