From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55190) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkAiM-0007fE-F7 for qemu-devel@nongnu.org; Wed, 14 Sep 2016 09:59:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bkAiH-00033q-Fm for qemu-devel@nongnu.org; Wed, 14 Sep 2016 09:59:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47340) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkAiH-000332-7b for qemu-devel@nongnu.org; Wed, 14 Sep 2016 09:58:57 -0400 References: <1473447778-29339-1-git-send-email-ashijeetacharya@gmail.com> <27b83d5e-c371-d67f-7abb-6fcce6e01f79@redhat.com> From: Eric Blake Message-ID: <30517604-e6a5-ea1d-7672-3dc5250e4ded@redhat.com> Date: Wed, 14 Sep 2016 08:58:55 -0500 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="mBVTqUDcDG7cDcEK9Di40QBCb8Wp4TBtE" Subject: Re: [Qemu-devel] [PATCH v5] migrate: Move max-bandwidth and downtime-limit to migrate_set_parameter List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ashijeet Acharya Cc: lcapitulino@redhat.com, quintela@redhat.com, amit.shah@redhat.com, armbru@redhat.com, "dgilbert@redhat.com" , Paolo Bonzini , "Daniel P. Berrange" , QEMU Developers This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --mBVTqUDcDG7cDcEK9Di40QBCb8Wp4TBtE From: Eric Blake To: Ashijeet Acharya Cc: lcapitulino@redhat.com, quintela@redhat.com, amit.shah@redhat.com, armbru@redhat.com, "dgilbert@redhat.com" , Paolo Bonzini , "Daniel P. Berrange" , QEMU Developers Message-ID: <30517604-e6a5-ea1d-7672-3dc5250e4ded@redhat.com> Subject: Re: [PATCH v5] migrate: Move max-bandwidth and downtime-limit to migrate_set_parameter References: <1473447778-29339-1-git-send-email-ashijeetacharya@gmail.com> <27b83d5e-c371-d67f-7abb-6fcce6e01f79@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/14/2016 03:05 AM, Ashijeet Acharya wrote: >>> + if (params->has_max_bandwidth && >>> + (params->max_bandwidth < 0 || params->max_bandwidth > SIZE_M= AX)) { >>> + error_setg(errp, QERR_INVALID_PARAMETER_VALUE, >>> + "max_bandwidth", >>> + "an integer in the range of 0 to SIZE_MAX"); >> >> Might be nicer to give a numeric value instead of assuming the reader >> knows what value SIZE_MAX has, but not the end of the world. >=20 > I used SIZE_MAX because substituting it with its value looked a bit mes= sy. > Should I use its actual value? as in ("...%zu", ..., SIZE_MAX), since not all platforms have the same value of SIZE_MAX. I'm okay if you don't bother, but if you do, see if any other code does similar, and copy how they do it (I seem to recall past complaints about a cast being needed because at least one system has a broken header that defines SIZE_MAX with the wrong type). --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --mBVTqUDcDG7cDcEK9Di40QBCb8Wp4TBtE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJX2VefAAoJEKeha0olJ0NqpUsH/iKH5bkbdbU0uy0D/cqqjSpd asidPmFlraGdbj9/A+dWPMIlJFb3KDbrot4Ud6GrPv88SBU1f+Q6uYWYNMzBaEb6 OuFlDJLzbEi55W490xXoiuVUNvh+EjaqodoCN3kkw5xjimLhdRmA0d5I+VYiRDqi XjrczYucse8Mb3a3pVOcbQLW5J6etj+enHWh6B15KMeVyouvFN5F6ER63+jnRx7E Z1Wu3CGx2589RabGC6soxeJeYaJc6pnUBC+/UFGH1sK9FkwkfmZAg61+a6NE7eBW ZG1Nj82Q0/FH8GhcrW4EQtlybm8AJXEmCwmF1yZDcKMSZAI2EB6ZaGWylQnTU9w= =IohQ -----END PGP SIGNATURE----- --mBVTqUDcDG7cDcEK9Di40QBCb8Wp4TBtE--