Am Dienstag, den 28.07.2009, 19:42 +0200 schrieb Robert Millan:
> On Tue, Jul 28, 2009 at 11:15:09PM +0800, Bean wrote:
>
> > +static int
> > +probe_raid_level (grub_disk_t disk)
> > +{
> > + if (disk->dev->id != GRUB_DISK_DEVICE_RAID_ID)
> > + return -1;
> > +
> > + return ((struct grub_raid_array *) disk->data)->level;
> > +}
>
> Since this an ad-hoc function, could you put it in the same block that
> needs it? If 'static' qualifier is present, it won't result in nested
> function AFAICT.
>
GCC manual [0] says:
A nested function always has no linkage. Declaring one with extern or
static is erroneous.
[0]
http://gcc.gnu.org/onlinedocs/gcc-4.4.1/gcc/Nested-Functions.html#Nested-Functions
--
Felix Zielcke
Proud Debian Maintainer
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel