[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 19:09:33 +0100
User-agent: Mutt/1.5.6i

> I don't understand what you mean, can you provide an example of how it 
> would be used by arch-neutral code? If you're thinking of something 
> like this:
>       switch (p->type) {
>               case DOS_PARTITION:
>                       name = dos_get_name(p);
>                       break;
>               case APPLE_PARTITION:
>                       name = apple_get_name(p);
>                       break;
>       }
> ... then that is much better handled by calling through the disk->ops 
> function pointers:
>       name = grub_partition_get_name(p);

Ok. This was not clear to me. I saw no connection between ops and
struct. So, struct type must be "given" together with ops.

                                 Tomas 'ebi' Ebenlendr
                                 PF 2004.8382375468

reply via email to

[Prev in Thread] Current Thread [Next in Thread]