boot1.c (231810) | boot1.c (235988) |
---|---|
1/*- 2 * Copyright (c) 1998 Robert Nordier 3 * All rights reserved. 4 * Copyright (c) 2001 Robert Drehmel 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms are freely 8 * permitted provided that the above copyright notice and this 9 * paragraph and the following disclaimer are duplicated in all 10 * such forms. 11 * 12 * This software is provided "AS IS" and without any express or 13 * implied warranties, including, without limitation, the implied 14 * warranties of merchantability and fitness for a particular 15 * purpose. 16 */ 17 18#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1998 Robert Nordier 3 * All rights reserved. 4 * Copyright (c) 2001 Robert Drehmel 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms are freely 8 * permitted provided that the above copyright notice and this 9 * paragraph and the following disclaimer are duplicated in all 10 * such forms. 11 * 12 * This software is provided "AS IS" and without any express or 13 * implied warranties, including, without limitation, the implied 14 * warranties of merchantability and fitness for a particular 15 * purpose. 16 */ 17 18#include <sys/cdefs.h> |
19__FBSDID("$FreeBSD: head/sys/boot/powerpc/boot1.chrp/boot1.c 231810 2012-02-16 03:27:38Z nwhitehorn $"); | 19__FBSDID("$FreeBSD: head/sys/boot/powerpc/boot1.chrp/boot1.c 235988 2012-05-25 09:36:39Z gleb $"); |
20 21#include <sys/param.h> 22#include <sys/dirent.h> 23#include <machine/elf.h> 24#include <machine/stdarg.h> 25 26#define _PATH_LOADER "/boot/loader" 27#define _PATH_KERNEL "/boot/kernel/kernel" --- 12 unchanged lines hidden (view full) --- 40static const char digits[] = "0123456789abcdef"; 41 42static char bootpath[128]; 43static char bootargs[128]; 44 45static ofwh_t bootdev; 46 47static struct fs fs; | 20 21#include <sys/param.h> 22#include <sys/dirent.h> 23#include <machine/elf.h> 24#include <machine/stdarg.h> 25 26#define _PATH_LOADER "/boot/loader" 27#define _PATH_KERNEL "/boot/kernel/kernel" --- 12 unchanged lines hidden (view full) --- 40static const char digits[] = "0123456789abcdef"; 41 42static char bootpath[128]; 43static char bootargs[128]; 44 45static ofwh_t bootdev; 46 47static struct fs fs; |
48static ino_t inomap; | |
49static char blkbuf[BSIZEMAX]; 50static unsigned int fsblks; 51 52static uint32_t fs_off; 53 54int main(int ac, char **av); 55 56static void exit(int) __dead2; --- 430 unchanged lines hidden (view full) --- 487} 488 489static void 490load(const char *fname) 491{ 492 Elf32_Ehdr eh; 493 Elf32_Phdr ph; 494 caddr_t p; | 48static char blkbuf[BSIZEMAX]; 49static unsigned int fsblks; 50 51static uint32_t fs_off; 52 53int main(int ac, char **av); 54 55static void exit(int) __dead2; --- 430 unchanged lines hidden (view full) --- 486} 487 488static void 489load(const char *fname) 490{ 491 Elf32_Ehdr eh; 492 Elf32_Phdr ph; 493 caddr_t p; |
495 ino_t ino; | 494 ufs_ino_t ino; |
496 int i; 497 498 if ((ino = lookup(fname)) == 0) { 499 printf("File %s not found\n", fname); 500 return; 501 } 502 if (fsread(ino, &eh, sizeof(eh)) != sizeof(eh)) { 503 printf("Can't read elf header\n"); --- 269 unchanged lines hidden --- | 495 int i; 496 497 if ((ino = lookup(fname)) == 0) { 498 printf("File %s not found\n", fname); 499 return; 500 } 501 if (fsread(ino, &eh, sizeof(eh)) != sizeof(eh)) { 502 printf("Can't read elf header\n"); --- 269 unchanged lines hidden --- |