Linux OTB enclosures

Maciej Grela maciej.grela at gmail.com
Wed Feb 11 08:10:47 PST 2009


Hi,

I'm currently working on supporting One-Touch-Backup buttons on HDD
enclosures in Linux. The information about it and the source code is
available on http://mgrela.rootnode.net At this moment i have working
polling code in bash for Prolific PL-2506 chip (most popular) and
Sunplus (also popular). This should cover most of IDE HDD cases
available on the market. SATA cases should also work.

I want to write an addon for HAL which could be invoked for all
supported devices and poll them for OTB button status (ie. once per
second). Do you think, that writing another addon just for this is a
good idea or should I patch hald-storage ? Adding the polling to
hald-storage addon would be good for reducing wakeups (only one addon
polling the device) but it may be not the proper place for OTB
support. On the other hand, creating a new addon would mean
duplicating a significant amount of hald-storage code. The other thing
I'm considering is how to pass the "Backup" button keypress event. I
see two approaches:

- spawn a uinput device emitting KEY_COPY when the button is pressed
- emit a dbus signal just like for media change notification in HAL

I'd probably go for the dbus signal approach but the uinput device
could allow the user to directly bind the keypress to an action using
whatever WM keybinding application in xorg. What are your opinions on
this ?

Best regards,
Maciej Grela


More information about the hal mailing list