Subject: Re: Last remaining insque / remque uses
To: Ignatios Souvatzis <is@netbsd.org>
From: Iain Hibbert <plunky@rya-online.net>
List: tech-kern
Date: 10/26/2007 21:44:37
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--0-1239140617-1193431477=:10412
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Fri, 26 Oct 2007, Ignatios Souvatzis wrote:

> I have some demo packet sending / receiving code for sending simple
> datagram packets; I should be able to do function tests for that
> code path.

In that case, here is a patch to remove insque/remque usage from netiso.

iain
--0-1239140617-1193431477=:10412
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=iso.diff
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.NEB.4.64.0710262144370.10412@localhost.>
Content-Description: remove insque/remque in netiso
Content-Disposition: attachment; filename=iso.diff

LS0tIC91c3Ivc3JjL3N5cy9uZXRpc28vZW9udmFyLmgJMjAwNy0wNy0yMCAy
MjoyNDo1MS4wMDAwMDAwMDAgKzAxMDANCisrKyBlb252YXIuaAkyMDA3LTEw
LTI2IDA5OjIzOjEzLjAwMDAwMDAwMCArMDEwMA0KQEAgLTE1OSwxOCArMTU5
LDE1IEBADQogI3VuZGVmIEluY1N0YXQNCiAjZGVmaW5lIEluY1N0YXQoeHh4
KSBlb25zdGF0Lnh4eCsrDQogDQotdHlwZWRlZiBzdHJ1Y3QgcWhkciB7DQot
CXN0cnVjdCBxaGRyICAgICpsaW5rLCAqcmxpbms7DQotfSAgICAgICAgICAg
ICAgKnF1ZXVlX3Q7DQotDQogc3RydWN0IGVvbl9sbGluZm8gew0KLQlzdHJ1
Y3QgcWhkciAgICAgZWxfcWhkcjsvKiBrZWVwIGFsbCBpbiBhIGxpc3QgKi8N
CiAJaW50ICAgICAgICAgICAgIGVsX2ZsYWdzOwkvKiBjYWNoZSB2YWxpZCA/
ICovDQogCWludCAgICAgICAgICAgICBlbF9zbnBhb2Zmc2V0OwkvKiBJUCBh
ZGRyZXNzIGNvbnRha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