Date: Tue, 29 Apr 2014 00:38:47 +0000 (UTC) From: Ian Lepore <ian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265070 - stable/10/sys/boot/uboot/common Message-ID: <201404290038.s3T0clCP029228@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ian Date: Tue Apr 29 00:38:46 2014 New Revision: 265070 URL: http://svnweb.freebsd.org/changeset/base/265070 Log: MFC r262666: exit with code 0xbadab1 if the u-boot API support is missing. Modified: stable/10/sys/boot/uboot/common/main.c Modified: stable/10/sys/boot/uboot/common/main.c ============================================================================== --- stable/10/sys/boot/uboot/common/main.c Tue Apr 29 00:36:51 2014 (r265069) +++ stable/10/sys/boot/uboot/common/main.c Tue Apr 29 00:38:46 2014 (r265070) @@ -124,15 +124,21 @@ main(void) struct open_file f; const char * loaderdev; + /* + * If we can't find the magic signature and related info, exit with a + * unique error code that U-Boot reports as "## Application terminated, + * rc = 0xnnbadab1". Hopefully 'badab1' looks enough like "bad api" to + * provide a clue. It's better than 0xffffffff anyway. + */ if (!api_search_sig(&sig)) - return (-1); + return (0x01badab1); syscall_ptr = sig->syscall; if (syscall_ptr == NULL) - return (-2); + return (0x02badab1); if (sig->version > API_SIG_VERSION) - return (-3); + return (0x03badab1); /* Clear BSS sections */ bzero(__sbss_start, __sbss_end - __sbss_start);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404290038.s3T0clCP029228>