raw device property
Soren Hansen
sh at linux2go.dk
Thu Mar 30 12:42:48 PST 2006
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.
--
| Soren Hansen | Linux2Go | http://Linux2Go.dk/ |
| Seniorkonsulent | Lindholmsvej 42, 2. TH | +45 46 90 26 42 |
| sh at linux2go.dk | 9400 Norresundby, Denmark | GPG key: E8BDA4E3 |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/hal/attachments/20060330/8ca5c0d5/attachment.pgp
More information about the hal
mailing list