Received: from eggs.gnu.org ([2001:4830:134:3::10]:40973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3RTh-0003Yr-D8 for qemu-devel@nongnu.org; Mon, 30 Nov 2015 11:39:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3RTd-00058T-D3 for qemu-devel@nongnu.org; Mon, 30 Nov 2015 11:39:01 -0500 Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Programmingkid In-Reply-To: <20151130162639.GI4494@noname.str.redhat.com> Date: Mon, 30 Nov 2015 11:38:53 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: References: <5656892E.9020908@redhat.com> <2BF45FF0-31E6-4901-B4B5-90FF3D672C70@gmail.com> <565C7723.5090400@redhat.com> <20151130162639.GI4494@noname.str.redhat.com> Subject: Re: [Qemu-devel] [PATCH v9] block/raw-posix.c: Make physical devices usable in QEMU under Mac OS X host List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel qemu-devel , Qemu-block On Nov 30, 2015, at 11:26 AM, Kevin Wolf wrote: > Am 30.11.2015 um 17:19 hat Eric Blake geschrieben: >> On 11/27/2015 12:35 PM, Programmingkid wrote: >>=20 >>>> Unusual indentation; more typical is: >>>>=20 >>>> | static kern_return_t FindEjectableOpticalMedia(io_iterator_t >>>> *mediaIterator, >>>> | char *mediatType) >>>=20 >>> I agree. I wanted the second long to be right justified with the 80 = character line count. >>=20 >> No. We don't right-justify code to 80 columns. That's not how it is >> done. Trying to do it just makes you look like the proverbial 'kid' = in >> your pseudonym, rather than an adult to be taken seriously. >>=20 >> Really, PLEASE follow the indentation patterns of the rest of the = code >> base - where continued lines are left-justified to be underneath the >> character after (, and NOT right-justified to 80 columns. Violating >> style doesn't make your code invalid, but does make your patches less >> likely to be applied. >>=20 >>=20 >>>>> + /* If you found a match, leave the loop */ >>>>> + if (*mediaIterator !=3D 0) { >>>>> + DPRINTF("Matching using %s\n", = matching_array[index]); >>>>> + snprintf(mediaType, strlen(matching_array[index])+1, = "%s", >>>>=20 >>>> Spaces around binary '+'. >>>=20 >>> What's wrong with no spaces around the plus sign? >>=20 >> Again, the prevailing conventions in the code base is that you put >> spaces around every binary operator. Yes, there is existing old code >> that does not meet the conventions, but it is not an excuse to add = new >> code that is gratuitously different. >>=20 >>>=20 >>>>=20 >>>>> + /* if a working partition on the device was not found */ >>>>> + if (partition_found =3D=3D false) { >>>>> + error_setg(errp, "Error: Failed to find a working = partition on " >>>>> + = "disc!\n"); >>>>=20 >>>> and I already pointed out on v8 that this is not the correct usage = of >>>> error_setg(). So, here's hoping v10 addresses the comments here = and >>>> elsewhere. >>>=20 >>> Kevin Wolf wanted it this way. What would you do instead? >>=20 >> Keven and I both want you to use error_setg(), but to use it = correctly - >> and the correct way is to NOT supply a trailing \n. >=20 > Nor leading "Error:", for that matter. I just think that using "Error" does communicate the fact that something = is wrong a lot better than just printing the message.=20=