[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: partition map reorganization
From: |
Tomas Ebenlendr |
Subject: |
Re: partition map reorganization |
Date: |
Tue, 2 Nov 2004 07:56:01 +0100 |
User-agent: |
Mutt/1.5.6i |
I have just two questions. (I didn't see the code for a long time, so
I'm sory if I misunderstand something.)
> struct grub_partition_ops {
> grub_err_t (*iterate) (struct grub_disk *disk,
> int (*hook) (const grub_partition_t
> partition));
> grub_partition_t (*probe) (struct grub_disk *disk, const char *str);
> char * (*get_name) (const grub_partition_t p);
> };
>
> Impact to existing code can be minimized with wrappers like this:
>
> static inline char *
> grub_partition_get_name (const grub_partition_t p)
> {
> return p->disk->ops->get_name (p);
> }
Do you want partition ops to be member of disk structure?
> struct grub_partition {
> unsigned long start;
> unsigned long len;
> unsigned int index;
> struct grub_disk_t disk;
> };
Umm, what about 'type' field? (To be sure that some generic partition is
the dos one.)
--
Tomas 'ebi' Ebenlendr
http://get.to/ebik
PF 2004.83695513307