raw device property

Jürg Billeter j at bitron.ch
Thu Mar 30 12:53:02 PST 2006


On Don, 2006-03-30 at 22:42 +0200, Soren Hansen wrote:
> On Thu, Mar 30, 2006 at 12:27:10PM -0800, Artem Kachitchkine wrote:
> > IMO o_direct_raw doesn't add much to the abstraction, 'cause you'll
> > have to do conditional compilation of your client application anyway.
> 
> How do you figure that?
> 
> pseudo code:
> if exists(block.raw_device)
> 	open(block.raw_device)
> else if exists(block.device) and block.o_direct_raw == true
> 	open(block.raw_device, O_DIRECT)
> else
> 	return "oh, bugger, this thing doesn't do raw access"
> 
> 
> Any detection will occur at run time.

O_DIRECT is defined on Solaris?

Jürg



More information about the hal mailing list