From owner-svn-src-all@freebsd.org Mon Oct 3 16:25:58 2016 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 95A6AAF4AA6; Mon, 3 Oct 2016 16:25:58 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (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 698BA21A; Mon, 3 Oct 2016 16:25:58 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from marcels-mbp.int.brkt.com.mail (cerberus.brkt.com [208.185.168.138]) (authenticated bits=0) by mail.xcllnt.net (8.15.2/8.15.2) with ESMTPSA id u93GPoce068070 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Mon, 3 Oct 2016 09:25:51 -0700 (PDT) (envelope-from marcel@xcllnt.net) Date: Mon, 3 Oct 2016 09:25:44 -0700 From: Marcel Moolenaar To: Warner Losh , Ed Schouten Cc: "=?utf-8?Q?svn-src-all=40freebsd.org?=" , src-committers , "=?utf-8?Q?svn-src-head=40freebsd.org?=" , Marcel Moolenaar Message-ID: In-Reply-To: References: <201610030400.u9340UM1012582@repo.freebsd.org> Subject: Re: svn commit: r306622 - head/usr.bin/mkimg X-Mailer: Airmail (382) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="559D0520-19C5-48DA-8B8C-FCC7BB364736"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.xcllnt.net [50.0.150.214]); Mon, 03 Oct 2016 09:25:51 -0700 (PDT) X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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: Mon, 03 Oct 2016 16:25:58 -0000 --559D0520-19C5-48DA-8B8C-FCC7BB364736 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On October 2, 2016 at 11:52:33 PM, Warner Losh (imp=40bsdimp.com) wrote: Wouldn't it be better to say at the top=C2=A0 =23ifndef O=46=46=5FMAX=C2=A0 =23define O=46=46=5FMAX INT64=5FMAX=C2=A0 =23endif=C2=A0 Not sure. The max is just for input checking. We do not even try to deal = with an lseek(2) implementation that doesn=E2=80=99t take a 64-bit offset= argument. Granted, the use of O=46=46=5FMAX before was based on =46reeBS= D=E2=80=99s lseek(2) implementation and was chosen to match it, knowing v= ery well that it has a 64-bit offset argument. If lseek(2) doesn=E2=80=99= t take a 64-bit offset then mkimg(1) fails for images larger than 2GB, bu= t the problems with that run deeper than the max capacity that a user can= specify on the mkimg command line. Not using O=46=46=5FMAX is a clear in= dication that the limit is not fully determined by lseek(2), but to a gre= ater extend by the datatype used to hold the capacity. Hence by preference for going with INT64=5FMAX. Easy to change if people = feel I should keep using O=46=46=5FMAX. --559D0520-19C5-48DA-8B8C-FCC7BB364736 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using AMPGpg -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJX8oaJAAoJEIda8t8f0tjj3gEP/il69UBVq4pDb+CUupE9xULa GYcK+h/4OVhX3iTmPTwNCooU55hlf2YOoy9AszVTXRN6VCEVzGdVLxuzvOuaUTW9 RxjrvcQqSR7tFxtoshfJda0O+Vsa1vv6Q0HWJKldmxD5BQ0ziKETy++7RFXggcLW OrkN+h1sbOGje/xSu/4ysDN1GKu8mjR+7ZMZPgnDE/mfYovFQbTMdccc34RW5jql y/74pc9pYllO3ZW1xviRMlI4ONJposqkHxQOOVhilvnzund3lVdX0qvSUDE58zFJ Mt7QBjLC44i6YjS4lxKPBFCzrQmWddI/sDAQB508p39KW9oFtB5+giJroHloViKu M4ISFh4fd6hjr4cAdRDXT+djQFsulnugCr+IUZOLNNFy8BZLEjhkd5Q/0EgyUlyG IONCycnHaFOWaJ4dg7ulSG9ElJmiEBGAkj3d8JRp3azdN0ks3zeUTVnS7zHjiZTw qWOACjt3i5Nrxp1UMLdnaSFXzBi+EdLrICsSe8gtEh2vREJs8CQD6XiHkmKfVO9J utFj2LZTmvIQf/w2u3xqIGZ6iTpWgVW5cZiG2xYoWABhNdJCt7IGkWM04SGPzDIQ uum/l9qFISpTJdijpruFmHFU0bP8LBFSk3A+uTcyfFzASRVCfH/OBBZvzFmyjROg fJHjKTpYdzz6CavPA49N -----END PGP SIGNATURE----- --559D0520-19C5-48DA-8B8C-FCC7BB364736--