Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Nov 2011 13:15:33 +0100
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Hans Petter Selasky <hselasky@c2i.net>
Cc:        freebsd-usb@freebsd.org
Subject:   Re: Quirk for a USB mass storage device
Message-ID:  <20111101121533.GA4567@garage.freebsd.pl>
In-Reply-To: <201110302115.40450.hselasky@c2i.net>
References:  <4EA9127E.80504@entel.upc.edu> <201110290851.15130.hselasky@c2i.net> <20111029183807.GF1713@garage.freebsd.pl> <201110302115.40450.hselasky@c2i.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111101121533.GA4567>