Date: Wed, 10 Nov 2004 16:42:18 +0100 From: Simon 'corecode' Schubert <corecode@fs.ei.tum.de> To: Nehal <nehalmistry@gmx.net> Cc: FreeBSD Hackers <hackers@freebsd.org> Subject: Re: read/write less than sector size Message-ID: <1A8C11E2-332F-11D9-8841-000A95B5756A@fs.ei.tum.de> In-Reply-To: <41923564.7W4yXnkn0Ia1Jjug%nehalmistry@gmx.net> References: <41923564.7W4yXnkn0Ia1Jjug%nehalmistry@gmx.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail-12--612429271 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed On 10.11.2004, at 16:36, Nehal wrote: > 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? maybe mmap the device if that's possible? cheers simon -- /"\ \ / \ ASCII Ribbon Campaign / \ Against HTML Mail and News --Apple-Mail-12--612429271 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Darwin) iD8DBQFBkjbfr5S+dk6z85oRAlj+AKD7V0RM/+DjipAgCoiKAOYUkG1fFQCfZPs8 b72h5gnDqb2+ruEIT2SPkdc= =OWRF -----END PGP SIGNATURE----- --Apple-Mail-12--612429271--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1A8C11E2-332F-11D9-8841-000A95B5756A>