From owner-svn-src-head@freebsd.org Wed Aug 17 08:32:27 2016 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 6C8D9BBCD31; Wed, 17 Aug 2016 08:32:27 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 41F1C1E69; Wed, 17 Aug 2016 08:32:25 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id b6d34547; Wed, 17 Aug 2016 10:32:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=kB47U7MuPNfxjwhBCLDkvrQAYp4=; b=J5KJeikMT1hfOgToim0QQ4rUDWFK nncvEI+b3uI9YsHV79vMqrs10u5fy03UPGWF6nrvprd4bwNtqnFZo6kYxxu64EdR 7446PQRKVsh8D7xNwgzib9HF6Jvwy/N2GU73Oh44GwrshkMCCjTHNbbpXorhiZFw 4Jzyz1JN2X1VvKw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=i0iiy0daMvUN+S8W7P5dOz9SlKZw2PoIPOtSOU7IXmtFblq7voOBrX6L ClmW3sLUwKwp0hRMTlkdv5jFi9/B5OvX64r/2tbeLb+L0ss73RZb7BhJiskRXxGz DMw49IMPiXLzRf7SqC0bKzIBappP0i7RB6fFTaQd78P4c9xmFaI= Received: from knuckles.blih.net (ip-54.net-82-216-203.roubaix.rev.numericable.fr [82.216.203.54]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 68084b43 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Wed, 17 Aug 2016 10:32:16 +0200 (CEST) Date: Wed, 17 Aug 2016 10:32:13 +0200 From: Emmanuel Vadot To: Warner Losh Cc: Ed Schouten , Emmanuel Vadot , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r304221 - head/sys/boot/efi/boot1 Message-Id: <20160817103213.e69dcfcbe18591a3fca30d9a@bidouilliste.com> In-Reply-To: References: <201608161423.u7GENZJi021956@repo.freebsd.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.29; amd64-portbld-freebsd12.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 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: Wed, 17 Aug 2016 08:32:27 -0000 On Tue, 16 Aug 2016 12:16:30 -0600 Warner Losh wrote: > On Tue, Aug 16, 2016 at 8:57 AM, Ed Schouten wrote: > > Hi Emmanuel, > > > > 2016-08-16 16:23 GMT+02:00 Emmanuel Vadot : > >> Author: manu > >> Date: Tue Aug 16 14:23:35 2016 > >> New Revision: 304221 > >> URL: https://svnweb.freebsd.org/changeset/base/304221 > >> > >> Log: > >> Use %ju modifier for u_int64_t and %jd modifier for off_t. > >> off_t is long long on arm32 and long on amd64 > > > > I think both of these should be solved differently: > > > > - For uint64_t, you can use 's PRIu64 in the formatting > > string. In kernel space, I suspect you need to use something like > > . > > cast it to intmax_t and use %jd. We've shunned PRIu64 in the tree. > It's existing practice, but I'm sure bruce will voice mild distaste. > > > - For off_t, it's all right to print it with %jd, but then be sure to > > also add a cast to the argument itself. It may not necessarily be > > equal to an intmax_t. > > The cast is important. > > Warner Thanks to all of you, I didn't know about PRI* (but I guess this was a good thing to not know about them). -- Emmanuel Vadot