Author: loos Date: Thu Feb 20 13:09:08 2014 New Revision: 262242 URL: http://svnweb.freebsd.org/changeset/base/262242
Log: 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) Modified: head/sys/boot/fdt/fdt_loader_cmd.c Modified: head/sys/boot/fdt/fdt_loader_cmd.c ============================================================================== --- head/sys/boot/fdt/fdt_loader_cmd.c Thu Feb 20 09:00:13 2014 (r262241) +++ head/sys/boot/fdt/fdt_loader_cmd.c Thu Feb 20 13:09:08 2014 (r262242) @@ -230,7 +230,7 @@ fdt_load_dtb_addr(struct fdt_header *hea 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!"); - return (0); - } - } + 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); } } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"