2008-02-09 Robert Millan <rmh@aybabtu.com>
* disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct and return a grub_diskmemberlist_t composed of LVM physical volumes. [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member. * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct and return a grub_diskmemberlist_t composed of physical array members. [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member. * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct prototype. [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer. [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration. [GRUB_UTIL] (grub_disk_memberlist_t): New typedef. * util/grub-probe.c (probe): Move partmap probing code from here ... (probe_partmap): ... to here. (probe): Use probe_partmap() once for the disk we're probing, and additionally, when such disk contains a memberlist() struct member, once for each disk that is contained in the structure returned by memberlist().
This commit is contained in:
parent
91a4bf68ff
commit
b92f0c1843
5 changed files with 123 additions and 15 deletions
|
@ -40,6 +40,9 @@ enum grub_disk_dev_id
|
|||
};
|
||||
|
||||
struct grub_disk;
|
||||
#ifdef GRUB_UTIL
|
||||
struct grub_disk_memberlist;
|
||||
#endif
|
||||
|
||||
/* Disk device. */
|
||||
struct grub_disk_dev
|
||||
|
@ -67,6 +70,10 @@ struct grub_disk_dev
|
|||
grub_err_t (*write) (struct grub_disk *disk, grub_disk_addr_t sector,
|
||||
grub_size_t size, const char *buf);
|
||||
|
||||
#ifdef GRUB_UTIL
|
||||
struct grub_disk_memberlist *(*memberlist) (struct grub_disk *disk);
|
||||
#endif
|
||||
|
||||
/* The next disk device. */
|
||||
struct grub_disk_dev *next;
|
||||
};
|
||||
|
@ -105,6 +112,15 @@ struct grub_disk
|
|||
};
|
||||
typedef struct grub_disk *grub_disk_t;
|
||||
|
||||
#ifdef GRUB_UTIL
|
||||
struct grub_disk_memberlist
|
||||
{
|
||||
grub_disk_t disk;
|
||||
struct grub_disk_memberlist *next;
|
||||
};
|
||||
typedef struct grub_disk_memberlist *grub_disk_memberlist_t;
|
||||
#endif
|
||||
|
||||
/* The sector size. */
|
||||
#define GRUB_DISK_SECTOR_SIZE 0x200
|
||||
#define GRUB_DISK_SECTOR_BITS 9
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue