Changeset View
Changeset View
Standalone View
Standalone View
stand/kboot/bootinfo.c
Show First 20 Lines • Show All 358 Lines • ▼ Show 20 Lines | #endif | ||||
*/ | */ | ||||
rootdevname = getenv("rootdev"); | rootdevname = getenv("rootdev"); | ||||
archsw.arch_getdev((void**)(&rootdev), rootdevname, NULL); | archsw.arch_getdev((void**)(&rootdev), rootdevname, NULL); | ||||
if (rootdev == NULL) { | if (rootdev == NULL) { | ||||
printf("Can't determine root device.\n"); | printf("Can't determine root device.\n"); | ||||
return(EINVAL); | return(EINVAL); | ||||
} | } | ||||
#ifdef EFI | |||||
/* Try reading the /etc/fstab file to select the root device */ | /* Try reading the /etc/fstab file to select the root device */ | ||||
getrootmount(devformat(rootdev)); | getrootmount(devformat(rootdev)); | ||||
#endif | |||||
addr = 0; | addr = 0; | ||||
for (xp = file_findfile(NULL, NULL); xp != NULL; xp = xp->f_next) { | for (xp = file_findfile(NULL, NULL); xp != NULL; xp = xp->f_next) { | ||||
if (addr < xp->f_addr + xp->f_size) | if (addr < xp->f_addr + xp->f_size) | ||||
addr = xp->f_addr + xp->f_size; | addr = xp->f_addr + xp->f_size; | ||||
} | } | ||||
/* Pad to a page boundary. */ | /* Pad to a page boundary. */ | ||||
▲ Show 20 Lines • Show All 88 Lines • Show Last 20 Lines |