From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44622) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQpAy-00055p-Px for qemu-devel@nongnu.org; Tue, 02 Feb 2016 23:36:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQpAy-0002b2-0A for qemu-devel@nongnu.org; Tue, 02 Feb 2016 23:36:20 -0500 References: <1CF37786-9AAA-4E5E-B571-DE20E7A463EB@gmail.com> <20160202171606.GM18461@redhat.com> <72A30A67-5846-4835-B8D2-B7F545F76C0B@gmail.com> <20160202173111.GN18461@redhat.com> <70C3852E-1807-419B-9205-F24B5409EABF@gmail.com> <56B10282.1030609@redhat.com> <54A3ED84-6284-48A5-AF16-3B2BE27917C6@gmail.com> <56B12802.8010208@redhat.com> <56B1663C.5040600@redhat.com> From: Eric Blake Message-ID: <56B183BC.8080107@redhat.com> Date: Tue, 2 Feb 2016 21:36:12 -0700 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="EkQ86knuppWmlNo0Ci17wq75RJOh9vR4n" Subject: Re: [Qemu-devel] ping: [PATCH v13] 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: Programmingkid Cc: Kevin Wolf , qemu-devel qemu-devel , Qemu-block This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --EkQ86knuppWmlNo0Ci17wq75RJOh9vR4n Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 02/02/2016 09:21 PM, Programmingkid wrote: >>> #if defined(__APPLE__) && defined(__MACH__) >>> /* if a physical device experienced an error while being opene= d */ >>> if (strncmp((*bsd_path ? bsd_path : filename), "/dev/", 5) =3D= =3D 0) { >>> print_unmounting_directions(*bsd_path ? bsd_path : filenam= e); >>> return -1; >>> } >> >> A bit repetitive. You don't use filename after the fact, so shorter >> would be: >> >> #if defined(__APPLE__)... >> if (*bsd_path) { >> filename =3D filename; Oops, I shouldn't be writing emails late at night. Let's try this again.= if (*bsd_path) { filename =3D bsd_path; } if (strncmp(filename, ... Hopefully that makes more sense. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --EkQ86knuppWmlNo0Ci17wq75RJOh9vR4n 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/ iQEcBAEBCAAGBQJWsYO8AAoJEKeha0olJ0NqHv8H/3NBOBiPuSeaiZmM7UF7nGXq r879wbWMLU19B/Mm+DSb9JAKJhTcpjyIeuRVkMXF1TUVXTBUaR+jaIPJGNJDbI9U UzoUDVtTLKoN5xRIQud2LYAcrF/hHlMfklyupb0XdVxPyU68uxu9AgWJZMi8xzl2 jyMTZQx8noOqn7q6eqEuO+3P2tvJQX6ZyndR99owfiuRb5WyhVtSrrHNTbwVeqFf c7389IbhEYi+dGAxeLlZf7SUCRbnbPmT65DEcVEDumbKQK1cCPh8NCn7h/Ti+JLL nlI8NlRnv3OsIAMQoNt5eFdRGwOv7a8YM0y/H/TNMt5NB5KQn/OMxKO3mjzgHrU= =4Ebt -----END PGP SIGNATURE----- --EkQ86knuppWmlNo0Ci17wq75RJOh9vR4n--