From owner-freebsd-hackers Tue Nov 28 17:40:29 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id RAA28393 for hackers-outgoing; Tue, 28 Nov 1995 17:40:29 -0800 Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id RAA28388 for ; Tue, 28 Nov 1995 17:40:21 -0800 Received: from msmith@localhost by genesis.atrad.adelaide.edu.au (8.6.12/8.6.9) id BAA09808 for hackers@freebsd.org; Wed, 29 Nov 1995 01:34:52 GMT From: Michael Smith Message-Id: <199511290134.BAA09808@genesis.atrad.adelaide.edu.au> Subject: uio question... To: hackers@freebsd.org Date: Wed, 29 Nov 1995 01:34:51 +0000 () MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 745 Sender: owner-hackers@freebsd.org Precedence: bulk Okay, my entry for the lame-device-driver-question of the month 8) Given a device read function passed a uio struct, what's the correct way to determine the total size of the read request? I have two possibles here : walk the array of iovec structures, or contemplate the uio_resid field, which appears to be used by a number of other drivers... Experience? -- ]] Mike Smith, Software Engineer msmith@atrad.adelaide.edu.au [[ ]] Genesis Software genesis@atrad.adelaide.edu.au [[ ]] High-speed data acquisition and (GSM mobile) 041-122-496 [[ ]] realtime instrument control (ph/fax) +61-8-267-3039 [[ ]] "Who does BSD?" "We do Chucky, we do." [[