grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ppc patch] grub_ieee1275_claim error checking


From: Hollis Blanchard
Subject: [ppc patch] grub_ieee1275_claim error checking
Date: Sun, 10 Oct 2004 13:54:35 -0500 (CDT)

Calling "claim" could fail in two different ways:
1) the "claim" word did not exist
2) the address range overlapped with an existing claim

Right now grub_ieee1275_claim just checks for condition 1, leaving it up
to callers to check condition 2. (The only current caller,
grub_load_linux, does not in fact check condition 2.) This is a bit
awkward, so I think both checks should be done here. Ok?

2004-10-10  Hollis Blanchard  address@hidden

        * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim):
        return -1 if args.base was -1.

Index: boot/powerpc/ieee1275/ieee1275.c
===================================================================
RCS file: /cvsroot/grub/grub2/boot/powerpc/ieee1275/ieee1275.c,v
retrieving revision 1.5
diff -u -r1.5 ieee1275.c
--- boot/powerpc/ieee1275/ieee1275.c    3 Oct 2004 09:19:10 -0000       1.5
+++ boot/powerpc/ieee1275/ieee1275.c    10 Oct 2004 18:46:44 -0000
@@ -420,6 +420,9 @@
   if (result)
     *result = args.base;
 
+  if (args.base == (grub_addr_t)-1)
+    return -1;
+
   return 0;
 }
 





reply via email to

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