From owner-svn-src-all@freebsd.org Fri Feb 3 16:52:54 2017 Return-Path: Delivered-To: svn-src-all@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 D8A71CCE728; Fri, 3 Feb 2017 16:52:54 +0000 (UTC) (envelope-from tsoome@me.com) Received: from st13p35im-asmtp002.me.com (st13p35im-asmtp002.me.com [17.164.199.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0DE7394; Fri, 3 Feb 2017 16:52:54 +0000 (UTC) (envelope-from tsoome@me.com) Received: from process-dkim-sign-daemon.st13p35im-asmtp002.me.com by st13p35im-asmtp002.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OKT00C005ES0H00@st13p35im-asmtp002.me.com>; Fri, 03 Feb 2017 16:52:48 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=4d515a; t=1486140768; bh=Nq/fDc7Y6OSrZ5c5SjailiQAqZTp0Fyf0BJL3z9+QOw=; h=Content-type:MIME-version:Subject:From:Date:Message-id:To; b=dz75ThfSYabfgeLC8qttlPnB0oejmY5t7IpJgdW0j0Bb2ZxtSsaXSvqF8qybpisq8 IaViPtwvsFBkeRJNL31+dXvbXYBqvlQ6IrJ4v7ScPgjl41Fc3Bhlz91GLyl9nf751l FkUISg3x88ksHNJinRzgWjBfksof8KPWlDmVAcGMxG2+w1Oc03pmpK8dfpQJGz1J4u +Jl2kzAghQzytsaXzYisQtfw1RV38dTzZlIdQ0cKp6Y+Qag4zWTBWgfc+uNVX3YkW6 QgpZ/UgTrkHyrIlJDTCnGWm4/5yauOky5vrhgKHRCT5sanO4/toBoDjxy8O/0owPsF 5tbHnbNj6yUzA== Received: from icloud.com ([127.0.0.1]) by st13p35im-asmtp002.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OKT0036M5JXSS40@st13p35im-asmtp002.me.com>; Fri, 03 Feb 2017 16:52:48 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-02-03_11:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1034 suspectscore=2 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1603290000 definitions=main-1702030162 Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: svn commit: r313166 - head/sys/boot/efi/libefi From: Toomas Soome In-reply-to: <1486140447.3017.189.camel@freebsd.org> Date: Fri, 03 Feb 2017 18:52:45 +0200 Cc: Toomas Soome , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-transfer-encoding: quoted-printable Message-id: <19994E26-42EE-4E12-9867-1E53FA2A7F81@me.com> References: <201702031639.v13GdAXQ074031@repo.freebsd.org> <1486140447.3017.189.camel@freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.3259) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 16:52:55 -0000 > On 3. veebr 2017, at 18:47, Ian Lepore wrote: >=20 > On Fri, 2017-02-03 at 16:39 +0000, Toomas Soome wrote: >> Author: tsoome >> Date: Fri Feb 3 16:39:10 2017 >> New Revision: 313166 >> URL: https://svnweb.freebsd.org/changeset/base/313166 >>=20 >> Log: >> loader: libefi/env.c warnings in arm build >> =20 >> The arm build has revealed some of the warnings, the fix for CHAR16 >> warning is to switch the warning off for env.c (same as for >> efinet.c). >> =20 >=20 > How is disabling the warning instead of just fixing it the right thing > to do? I think disabling a printf format warning is never the right > thing to do, it just turns a compile warning into a runtime failure. I would love to see the correct fix - as all UEFI chars are 2 byte; but = thats up to arm experts. I just do not know the details why the arm is = stuck with 4 byte wchar_t there - Im sure they do not have this just for = fun:) rgds, toomas >=20 > -- Ian >=20 >> For error code we need to use macro. >> =20 >> Reported by: gjb >> Reviewed by: imp >> Approved by: imp (mentor) >> Differential Revision: https://reviews.freebsd.org/D9422 >>=20 >> Modified: >> head/sys/boot/efi/libefi/Makefile >> head/sys/boot/efi/libefi/env.c >>=20 >> Modified: head/sys/boot/efi/libefi/Makefile >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> =3D=3D=3D=3D=3D=3D=3D=3D=3D >> --- head/sys/boot/efi/libefi/Makefile Fri Feb 3 16:36:14 2017 >> (r313165) >> +++ head/sys/boot/efi/libefi/Makefile Fri Feb 3 16:39:10 2017 >> (r313166) >> @@ -26,6 +26,7 @@ SRCS+=3D time_event.c >> # of a short. There's no good cast to use here so just ignore the >> # warnings for now. >> CWARNFLAGS.efinet.c+=3D -Wno-format >> +CWARNFLAGS.env.c+=3D -Wno-format >> =20 >> .if ${MACHINE_CPUARCH} =3D=3D "aarch64" >> CFLAGS+=3D -msoft-float -mgeneral-regs-only >>=20 >> Modified: head/sys/boot/efi/libefi/env.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> =3D=3D=3D=3D=3D=3D=3D=3D=3D >> --- head/sys/boot/efi/libefi/env.c Fri Feb 3 16:36:14 2017=09 >> (r313165) >> +++ head/sys/boot/efi/libefi/env.c Fri Feb 3 16:39:10 2017=09 >> (r313166) >> @@ -94,14 +94,16 @@ efi_print_var(CHAR16 *varnamearg, EFI_GU >> status =3D RS->GetVariable(varnamearg, matchguid, &attr, >> &datasz, NULL); >> if (status !=3D EFI_BUFFER_TOO_SMALL) { >> - printf("Can't get the variable: error %#lx\n", >> status); >> + printf("Can't get the variable: error %#lx\n", >> + EFI_ERROR_CODE(status)); >> return (CMD_ERROR); >> } >> data =3D malloc(datasz); >> status =3D RS->GetVariable(varnamearg, matchguid, &attr, >> &datasz, data); >> if (status !=3D EFI_SUCCESS) { >> - printf("Can't get the variable: error %#lx\n", >> status); >> + printf("Can't get the variable: error %#lx\n", >> + EFI_ERROR_CODE(status)); >> return (CMD_ERROR); >> } >> uuid_to_string((uuid_t *)matchguid, &str, &uuid_status); >>=20