Date: Wed, 17 Aug 2016 10:32:13 +0200 From: Emmanuel Vadot <manu@bidouilliste.com> To: Warner Losh <imp@bsdimp.com> Cc: Ed Schouten <ed@nuxi.nl>, Emmanuel Vadot <manu@freebsd.org>, src-committers <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@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: <CANCZdfqYVdW0H-PGZdmSdtZRHdxTe3=_h2WMqee6HxwJ6d_q%2BA@mail.gmail.com> References: <201608161423.u7GENZJi021956@repo.freebsd.org> <CABh_MK=NxcfMsVogF%2BEW_HvHvBNiKJ6wG8szCkC5jwbTsw8NMw@mail.gmail.com> <CANCZdfqYVdW0H-PGZdmSdtZRHdxTe3=_h2WMqee6HxwJ6d_q%2BA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 16 Aug 2016 12:16:30 -0600 Warner Losh <imp@bsdimp.com> wrote: > On Tue, Aug 16, 2016 at 8:57 AM, Ed Schouten <ed@nuxi.nl> wrote: > > Hi Emmanuel, > > > > 2016-08-16 16:23 GMT+02:00 Emmanuel Vadot <manu@freebsd.org>: > >> 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 <inttypes.h>'s PRIu64 in the formatting > > string. In kernel space, I suspect you need to use something like > > <machine/inttypes.h>. > > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160817103213.e69dcfcbe18591a3fca30d9a>