Author: royger Date: Wed Apr 1 10:10:20 2015 New Revision: 280954 URL: https://svnweb.freebsd.org/changeset/base/280954
Log: multiboot: fix error codes Return EINVAL instead of EFTYPE if we have a multiboot kernel loaded but failed to load the modules. This makes it clear that the kernel/module should be handled by the multiboot handler but something went wrong. Sponsored by: Citrix Systems R&D Modified: head/sys/boot/i386/libi386/multiboot.c Modified: head/sys/boot/i386/libi386/multiboot.c ============================================================================== --- head/sys/boot/i386/libi386/multiboot.c Wed Apr 1 10:02:28 2015 (r280953) +++ head/sys/boot/i386/libi386/multiboot.c Wed Apr 1 10:10:20 2015 (r280954) @@ -243,7 +243,7 @@ multiboot_exec(struct preloaded_file *fp /* Find the entry point of the Xen kernel and save it for later */ if ((md = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL) { printf("Unable to find %s entry point\n", fp->f_name); - error = EFTYPE; + error = EINVAL; goto error; } ehdr = (Elf_Ehdr *)&(md->md_data); @@ -271,7 +271,7 @@ multiboot_exec(struct preloaded_file *fp fp = file_findfile(NULL, "elf kernel"); if (fp == NULL) { printf("No FreeBSD kernel provided, aborting\n"); - error = EFTYPE; + error = EINVAL; goto error; } @@ -380,7 +380,7 @@ multiboot_obj_loadfile(char *filename, u printf( "Unable to load %s as a multiboot payload kernel\n", filename); - return (EFTYPE); + return (EINVAL); } /* Load kernel metadata... */ @@ -389,7 +389,7 @@ multiboot_obj_loadfile(char *filename, u if (error) { printf("Unable to load kernel %s metadata error: %d\n", rfp->f_name, error); - return (EFTYPE); + return (EINVAL); } /* _______________________________________________ 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"