Fix the boot on FDT-enabled systems after r261819.
While here, don't overwrite the error message on interactive use and add the missing '\n' at end of error message for the non interactive use. Tested by: ian, myself Approved by: adrian (mentor, implicit)
This commit is contained in:
parent
5a067ae187
commit
69728ec82d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=262242
@ -230,7 +230,7 @@ fdt_load_dtb_addr(struct fdt_header *header)
|
||||
int err;
|
||||
|
||||
fdtp_size = fdt_totalsize(header);
|
||||
err = fdt_check_header(&header);
|
||||
err = fdt_check_header(header);
|
||||
if (err < 0) {
|
||||
sprintf(command_errbuf, "error validating blob: %s",
|
||||
fdt_strerror(err));
|
||||
@ -667,7 +667,7 @@ fdt_fixup(void)
|
||||
{
|
||||
const char *env;
|
||||
char *ethstr;
|
||||
int chosen, err, eth_no, len;
|
||||
int chosen, eth_no, len;
|
||||
struct sys_info *si;
|
||||
|
||||
env = NULL;
|
||||
@ -675,13 +675,8 @@ fdt_fixup(void)
|
||||
ethstr = NULL;
|
||||
len = 0;
|
||||
|
||||
if (fdtp == NULL) {
|
||||
err = fdt_setup_fdtp();
|
||||
if (err) {
|
||||
sprintf(command_errbuf, "No valid device tree blob found!");
|
||||
if (fdtp == NULL && fdt_setup_fdtp() != 0)
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
||||
/* Create /chosen node (if not exists) */
|
||||
if ((chosen = fdt_subnode_offset(fdtp, 0, "chosen")) ==
|
||||
@ -747,7 +742,7 @@ fdt_copy(vm_offset_t va)
|
||||
if (fdtp == NULL) {
|
||||
err = fdt_setup_fdtp();
|
||||
if (err) {
|
||||
printf("No valid device tree blob found!");
|
||||
printf("No valid device tree blob found!\n");
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user