summaryrefslogtreecommitdiff
path: root/util/getpir/checkpir.c
diff options
context:
space:
mode:
authorJeremy Jackson <jerj@coplanar.net>2007-04-11 18:44:42 +0000
committerStefan Reinauer <stepan@openbios.org>2007-04-11 18:44:42 +0000
commit46d65e85a1c0449f86497264d5958b3d85784767 (patch)
tree5cdc08216595f7de00c1df21ddc0d188d39b022e /util/getpir/checkpir.c
parent4880353e03c62baacecaf634bc66c91be423f853 (diff)
downloadcoreboot-46d65e85a1c0449f86497264d5958b3d85784767.tar.xz
Jeremy Jackson wrote:
I'm guessing nobody has tried compiling it with 64bit userspace? Patch makes it compile cleanly and stops a "SEGV instead of working" issue. I also added a few checks for errors on system calls. Signed-off-by: Jeremy Jackson <jerj@coplanar.net> Reworked and Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2602 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/getpir/checkpir.c')
-rw-r--r--util/getpir/checkpir.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/util/getpir/checkpir.c b/util/getpir/checkpir.c
index 2a738e78a4..6a9a79fa28 100644
--- a/util/getpir/checkpir.c
+++ b/util/getpir/checkpir.c
@@ -1,16 +1,15 @@
/* checkpir.c : This software is released under GPL
- For Linuxbios use only
- Aug 26 2001 , Nikolai Vladychevski, <niko@isl.net.mx>
-*/
+ * For LinuxBIOS use only
+ * Aug 26 2001 , Nikolai Vladychevski, <niko@isl.net.mx>
+ */
#include <stdio.h>
-#include <arch/pirq_routing.h>
-
+#include "pirq_routing.h"
#include "checksum.h"
struct irq_routing_table *rt;
-main()
+int main(void)
{
uint8_t sum, newsum;
@@ -21,11 +20,12 @@ main()
printf("(no other tests are done)\n");
if (!sum) {
- printf("Checksum for IRQ Routing table is ok. You can use it in LinuxBios now\n");
+ printf("Checksum for IRQ Routing table is ok. You can use irq_tables.c in LinuxBIOS now.\n");
} else {
newsum = rt->checksum - sum;
printf("BAD CHECKSUM for IRQ Routing table !!!!\n");
printf("If you want to make it valid, change the checksum to: %#x\n",
newsum);
}
+ return 0;
}