From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 10 15:35:50 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4FBAA16A4CE for ; Wed, 10 Nov 2004 15:35:50 +0000 (GMT) Received: from shaw.ca (S0106000ae6ceb225.vf.shawcable.net [70.68.12.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id F179B43D5C for ; Wed, 10 Nov 2004 15:35:49 +0000 (GMT) (envelope-from Nehal@shaw.ca) Received: from Nehal.Home (somebody@localhost [127.0.0.1]) by shaw.ca (8.13.1/8.13.1) with ESMTP id iAAFa42p000604 for ; Wed, 10 Nov 2004 07:36:04 -0800 (PST) (envelope-from Nehal@Nehal.Home) Received: (from Nehal@localhost) by Nehal.Home (8.13.1/8.13.1/Submit) id iAAFa4Tr000603 for freebsd-hackers@freebsd.org; Wed, 10 Nov 2004 07:36:04 -0800 (PST) (envelope-from Nehal) Date: Wed, 10 Nov 2004 07:36:04 -0800 From: Nehal To: freebsd-hackers@freebsd.org Message-ID: <41923564.7W4yXnkn0Ia1Jjug%nehalmistry@gmx.net> User-Agent: nail 11.11 10/13/04 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: read/write less than sector size X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Nov 2004 15:35:50 -0000 if i open /dev/ad1s1 for example, i try to read() or write() not in multiples of 512, it will return an error. how would i do this? currently, if i need to read 100 bytes, i read in the full sector, then memcpy the bytes i need. is there a better way? -- thx, Nehal