Date: Mon, 3 Oct 2016 09:25:44 -0700 From: Marcel Moolenaar <marcel@xcllnt.net> To: Warner Losh <imp@bsdimp.com>, Ed Schouten <ed@nuxi.nl> Cc: "=?utf-8?Q?svn-src-all=40freebsd.org?=" <svn-src-all@freebsd.org>, src-committers <src-committers@freebsd.org>, "=?utf-8?Q?svn-src-head=40freebsd.org?=" <svn-src-head@freebsd.org>, Marcel Moolenaar <marcel@freebsd.org> Subject: Re: svn commit: r306622 - head/usr.bin/mkimg Message-ID: <etPan.57f28688.c7c4144.6f1a@xcllnt.net> In-Reply-To: <CANCZdfqc=eMENhs3hiMKCmvebnKmqnUpYGxwVLqhJY67Svksxg@mail.gmail.com> References: <201610030400.u9340UM1012582@repo.freebsd.org> <CABh_MKnPUzdFc6Q7bwGc%2BpA5GCqKS0evDGs_7AG10-YddE2Wtw@mail.gmail.com> <CANCZdfqc=eMENhs3hiMKCmvebnKmqnUpYGxwVLqhJY67Svksxg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?etPan.57f28688.c7c4144.6f1a>