read/write less than sector size

2004-11-10 Thread Nehal
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

Re: read/write less than sector size

2004-11-10 Thread Simon 'corecode' Schubert
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

Re: read/write less than sector size

2004-11-10 Thread Robert Watson
On Wed, 10 Nov 2004, 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. Disks operate only on