From owner-freebsd-current@FreeBSD.ORG Sat Apr 18 16:30:59 2015 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7041EC25; Sat, 18 Apr 2015 16:30:59 +0000 (UTC) Received: from albert.catwhisker.org (mx.catwhisker.org [198.144.209.73]) (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 3A21B1D7; Sat, 18 Apr 2015 16:30:58 +0000 (UTC) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.14.9/8.14.9) with ESMTP id t3IGUvLn062013; Sat, 18 Apr 2015 09:30:57 -0700 (PDT) (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.14.9/8.14.9/Submit) id t3IGUvXR062012; Sat, 18 Apr 2015 09:30:57 -0700 (PDT) (envelope-from david) Date: Sat, 18 Apr 2015 09:30:57 -0700 From: David Wolfskill To: Konstantin Belousov Cc: current@freebsd.org, Takanori Watanabe Subject: Re: Fix for r281680 -- broke i386 world Message-ID: <20150418163057.GD36163@albert.catwhisker.org> Mail-Followup-To: David Wolfskill , Konstantin Belousov , current@freebsd.org, Takanori Watanabe References: <20150418151702.GB36163@albert.catwhisker.org> <20150418153459.GX2390@kib.kiev.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="M8g8Xvd1npd+rU3W" Content-Disposition: inline In-Reply-To: <20150418153459.GX2390@kib.kiev.ua> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Apr 2015 16:30:59 -0000 --M8g8Xvd1npd+rU3W Content-Type: multipart/mixed; boundary="wtUqn8XWZYmnPFNh" Content-Disposition: inline --wtUqn8XWZYmnPFNh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 18, 2015 at 06:34:59PM +0300, Konstantin Belousov wrote: > ... > > - printf("LE_STATUS: %d %d %lx\n", e, rp.status, rp.le_status); > > + printf("LE_STATUS: %d %d %jx\n", e, rp.status, rp.le_status); > > =20 > > return 0; > > } >=20 > The j modificator specifies that the type of the argument is (u)intmax_t. > It is only a coincidense that uint64_t is max integer type, the arg should > be casted to uintmax_t. >=20 > Could you, please, update and test ? > .... Thank you for the correction; the attached patch survives both i386 & amd64 "make buildworld" ... and comes a bit closer to the above specification. (I had tried "(uintmax_t)rp.le_features" at first; that failed (at least on amd64), with: --- usr.sbin.all__D --- /usr/src/usr.sbin/bluetooth/hccontrol/le.c:236:15: error: expected ')' (uintmax_t)rp.le_features); ^ /usr/src/usr.sbin/bluetooth/hccontrol/le.c:235:8: note: to match this '(' printf("LOCAL SUPPORTED: %d %d %ju\n", e, rp.status, ^ /usr/src/usr.sbin/bluetooth/hccontrol/le.c:253:60: error: expected ')' printf("LE_STATUS: %d %d %jx\n", e, rp.status, (uintmax_t)rp.le_sta= tus); ^ /usr/src/usr.sbin/bluetooth/hccontrol/le.c:253:8: note: to match this '(' printf("LE_STATUS: %d %d %jx\n", e, rp.status, (uintmax_t)rp.le_sta= tus); ^ 2 errors generated. So I took a bit of evasive action.) Peace, david --=20 David H. Wolfskill david@catwhisker.org Those who murder in the name of God or prophet are blasphemous cowards. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --wtUqn8XWZYmnPFNh Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="bluetooth.diff" Content-Transfer-Encoding: quoted-printable Index: usr.sbin/bluetooth/hccontrol/le.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 --- usr.sbin/bluetooth/hccontrol/le.c (revision 281689) +++ usr.sbin/bluetooth/hccontrol/le.c (working copy) @@ -232,8 +232,8 @@ NG_HCI_OCF_LE_READ_LOCAL_SUPPORTED_FEATURES),=20 (void *)&rp, &n); =20 - printf("LOCAL SUPPORTED: %d %d %lu\n", e, rp.status, - rp.le_features); + printf("LOCAL SUPPORTED: %d %d %ju\n", e, rp.status, + (u_int64_t)rp.le_features); =20 return 0; } @@ -250,7 +250,7 @@ NG_HCI_OCF_LE_READ_SUPPORTED_STATUS), (void *)&rp, &n); =20 - printf("LE_STATUS: %d %d %lx\n", e, rp.status, rp.le_status); + printf("LE_STATUS: %d %d %jx\n", e, rp.status, (u_int64_t)rp.le_status); =20 return 0; } --wtUqn8XWZYmnPFNh-- --M8g8Xvd1npd+rU3W Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJVMobAXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ4RThEMDY4QTIxMjc1MDZFRDIzODYzRTc4 QTY3RjlDOERFRjQxOTNCAAoJEIpn+cje9Bk70VwP/RpkshV8t2K675ms2m9uzmgz ZkluZZkrjL5WEGJfw4DFLbK7Kdx5cCXDs5tdvAj+yGNrYwO0i/yf7PLJvFXaIzOS n6h27FZ4Su6pSkzOTGIdehKAe21K/2ai1DRHM1Vpm6yea4xhYSUjr51NcjtOhjcI e7AfBMlJ/sqgwIw6LemE9mp/mip+sPgzkyMORKiASeddfo3VLcbLdiNnesuPzGGp sg5Hw0i3+tqvMb05m5LNCj7YFLkKq2aeokHiNMtb6cfQC5hKEr9VtI2I9yAOp7J6 +7uF6kakYTmn/TurvugeOv67nNkK/t1voDaBnSuYfxCTCQKa75BAum0e5UFCFbzx 0bXz2SoE8nQ95+EA1XIw/hEQdsmUVXsn977OB04E1JBXdD81CSEjUmN/XWkbfRHn cY6Bj1DACljzea1ZjFbTxH3qBsztFbCQA4lG9dr7vAMy5lCwgwl2yYURln44IY0U u4cij42OGUdH8v0MAtL/xm9lprBMX0z81dnRlTsvWNCcYxf2AZnDAF6rjI+CMYzh 7cwkCpTk/YCoXAbXgVWb9ZKCRin52a3d+I9ldEOOsbGB5WNztaqDrkMOykIzc/Hl Keu3I5fjbZe9g7NXRIctBYLauLVwutB5LfJhaMusrwhQH2FAupnbGgryCidp7jjw rPFoSWP0/kBQRuPyexLf =pXY9 -----END PGP SIGNATURE----- --M8g8Xvd1npd+rU3W--