[Lazarus] How can I write to arbitrary position on device

Carlos E. R. robin.listas at telefonica.net
Wed Apr 12 23:05:52 CEST 2017


Hi,

I'm new on this list, so if I should post this to a different place, 
just tell me.

I want to find a function that I can use on Linux to write a memory 
block to an arbitrary position on a device, say, /dev/sda or /dev/sda5 .

I can do that on an opened file with seek() and write(), but apparently 
only on files. I need accessing the raw disk device. So currently I call 
'dd' instead.

I also had problems with blockread/write: it failed reading more than 
one megabyte.

-- 
Cheers

 	Carlos E. R.
 	(from 42.2 x86_64 "Malachite" at Telcontar)




More information about the Lazarus mailing list