From owner-svn-src-head@freebsd.org Mon Dec 21 22:42:04 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BEAE5A4EC64; Mon, 21 Dec 2015 22:42:04 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F7161ABA; Mon, 21 Dec 2015 22:42:04 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tBLMg3H9035363; Mon, 21 Dec 2015 22:42:03 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tBLMg3IH035362; Mon, 21 Dec 2015 22:42:03 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201512212242.tBLMg3IH035362@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 21 Dec 2015 22:42:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r292576 - head/sys/boot/efi/boot1 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Dec 2015 22:42:04 -0000 Author: emaste Date: Mon Dec 21 22:42:03 2015 New Revision: 292576 URL: https://svnweb.freebsd.org/changeset/base/292576 Log: boot1.efi: show EFI error number, not full status value EFI return values set the high bit to indicate an error. The log messages changed here are printed only in the case of an error, so including the error bit is redundant. Also switch to decimal to match the error definitions (in sys/boot/efi/include/efierr.h). MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/sys/boot/efi/boot1/boot1.c Modified: head/sys/boot/efi/boot1/boot1.c ============================================================================== --- head/sys/boot/efi/boot1/boot1.c Mon Dec 21 22:40:29 2015 (r292575) +++ head/sys/boot/efi/boot1/boot1.c Mon Dec 21 22:42:03 2015 (r292576) @@ -330,18 +330,21 @@ load(const char *fname) status = systab->BootServices->LoadImage(TRUE, image, bootdevpath, buffer, bufsize, &loaderhandle); if (EFI_ERROR(status)) - printf("LoadImage failed with error %lx\n", status); + printf("LoadImage failed with error %lu\n", + status & ~EFI_ERROR_MASK); status = systab->BootServices->HandleProtocol(loaderhandle, &LoadedImageGUID, (VOID**)&loaded_image); if (EFI_ERROR(status)) - printf("HandleProtocol failed with error %lx\n", status); + printf("HandleProtocol failed with error %lu\n", + status & ~EFI_ERROR_MASK); loaded_image->DeviceHandle = bootdevhandle; status = systab->BootServices->StartImage(loaderhandle, NULL, NULL); if (EFI_ERROR(status)) - printf("StartImage failed with error %lx\n", status); + printf("StartImage failed with error %lu\n", + status & ~EFI_ERROR_MASK); } static void