From owner-freebsd-usb@FreeBSD.ORG Tue Nov 1 12:16:26 2011 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE49B1065670 for ; Tue, 1 Nov 2011 12:16:26 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 61E7A8FC17 for ; Tue, 1 Nov 2011 12:16:26 +0000 (UTC) Received: from localhost (host-89-230-170-58.ostrowmaz.mm.pl [89.230.170.58]) by mail.dawidek.net (Postfix) with ESMTPSA id 69F14A3B; Tue, 1 Nov 2011 13:16:23 +0100 (CET) Date: Tue, 1 Nov 2011 13:15:33 +0100 From: Pawel Jakub Dawidek To: Hans Petter Selasky Message-ID: <20111101121533.GA4567@garage.freebsd.pl> References: <4EA9127E.80504@entel.upc.edu> <201110290851.15130.hselasky@c2i.net> <20111029183807.GF1713@garage.freebsd.pl> <201110302115.40450.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mP3DRpeJDSE+ciuQ" Content-Disposition: inline In-Reply-To: <201110302115.40450.hselasky@c2i.net> X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-usb@freebsd.org Subject: Re: Quirk for a USB mass storage device X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2011 12:16:26 -0000 --mP3DRpeJDSE+ciuQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Oct 30, 2011 at 09:15:40PM +0100, Hans Petter Selasky wrote: > On Saturday 29 October 2011 20:38:07 Pawel Jakub Dawidek wrote: > > > + err =3D usbd_do_request(udev, NULL, &req, &buf); > > > + if (err) > > > + buf =3D 0; > > > + > > > + return (buf); > > > +} > >=20 > > You could drop 'err' variable and just check function return directly. > > There is only one extra empty line at the begining of the function. >=20 > No, because there is &buf. How about: if (usbd_do_request(udev, NULL, &req, &buf) !=3D 0) buf =3D 0; return (buf); > I'll add your device to the device quirk list. Ok. How come did it work in the past? I don't think that my device was removed from the quirk list by accident? May other, similar devices not work as well with the current code? --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --mP3DRpeJDSE+ciuQ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk6v4uQACgkQForvXbEpPzQw6gCeM1fVgtoA+kz9n72mwXt4Dj5L qP4AoMwXqKOeqqAQ0qRIEB1Bwe4beZJW =AH9k -----END PGP SIGNATURE----- --mP3DRpeJDSE+ciuQ--