<div id="RTEContent">Hi.<br><br>I did figure out an admittedly redundant kludge-y way after talking with John off-list (thanks John!) It's probably not the right solution; nonetheless it works.<br><br>My (and yours, and probably everyones' similar) problem is that I kept trying to refer to keys from a "deeper" udi than it's parent. AFAICT this does not work or I cannot decipher the proper refer syntax. So what I did to get it to work is to just clone the relevant values "up" to a "higher" udi where they are accessable.<br><br>In my case, I'm trying to match at the volume udi. But I wanted to refer to keys in storage.physical_device... two "levels below" as it were. However inside the volume's udi I could only access block.storage_device keys.(it's direct parent). To get around it I just copy the needed keys from physical. to block. and then when I match on volume level keys I can have access to these values... problem solved.<br><br>As exampled below, any media mounted via USB device
0x123 from vendor 0x1234 with serial 012345 will /always/ mount to /media/permanent_mount_point regardless of it's size, label, format, uuid, etc.<br><br>Hope this helps you.<br>-BP<br><br>----<br> <device><br> <match key="storage.bus" string="usb"><br> <match key="@storage.physical_device:usb.vendor_id" int="0x1234"><br> <match key="@storage.physical_device:usb.product_id" int="0x123"><br> <match key="@storage.physical_device:usb.serial" string="012345"><br> <merge key="usb.vendor_id" type="copy_property">@storage.physical_device:usb.vendor_id</merge><br> <merge key="usb.product_id" type="copy_property">@storage.physical_device:usb.product_id</merge><br> <merge key="usb.serial"
type="copy_property">@storage.physical_device:usb.serial</merge><br> </match><br> </match><br> </match><br> </match><br> </device><br><br> <device><br> <match key="block.is_volume" bool="true"><br> <match key="@block.storage_device:usb.vendor_id" int="0x1234"><br> <match key="@block.storage_device:usb.product_id" int="0x123"><br> <match key="@block.storage_device:usb.serial" string="012345"><br> <merge key="volume.policy.desired_mount_point" type="string">permanent_mount_point</merge><br> </match><br> </match><br> </match><br> </match><br> </device><br>----<br><br>--------------------------<br><br><br><b><i>"John (J5)
Palmieri" <johnp@redhat.com></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> On Fri, 2005-12-09 at 13:59 +0100, vitko wrote:<br>> Bill Paxton wrote:<br>> <br>> > I hate asking these kinds of questions, I've read the archives and <br>> > googled for a couple days but I can't figure it out on my own. Sorry.<br>> > <br>> > So here we have a USB Mass Storage camera. I can tickle udev to make a <br>> > snazzy device name for it, that works well but it's just cosmetic. The <br>> > big deal comes from the fdi entry and the mount point. I don't care if <br>> > it's /dev/sd? but I do care where it gets mounted.<br>> <br>> ...<br>> <br>> > And it does make those entries in the corresponding udi when you check <br>> > it with lshal. But that's not where the actual mount is; it's a parent <br>> > device.<br>> <br>> Bill, I have
similar problems, I'm trying to enforce custom mountpoint<br>> /media/apacerht203 for my Apacer flash drive. My FDI is<br>> <br>> $ cat /usr/share/hal/fdi/50user/apacer_ht203.fdi<br>> <!-- -*- SGML -*- --><br>> <br>> <deviceinfo version="0.2"><br>> <device><br><br>So the first match (or first few matches) needs to be a match that is<br>unique to the level you wish to append the property to. The you must<br>match on keys relative to that level using the @<udi_key>:<key> syntax<br>(i.e. <match key="@info.parent:usb.vendor_id" int="0x1005">). It is<br>best not to use info.parent because you can't be sure the parent won't<br>change in future releases but if there is no other UDI key that points<br>to the right level then this is the way to do it. Sorry I don't have<br>any USB hardware to give a better example with but it is all at the<br>office and the weather is keeping me from going in today. Check out the<br>storage policy fdi that ships with HAL for more
insight.<br><br>> <match key="info.bus" string="usb"><br>> <match key="usb.vendor_id" int="0x1005"><br>> <match key="usb.product_id" int="0xb113"><br>> <merge key="usb.product" type="string">FooBarJustToTestMatchWorks</merge><br>> <merge key="volume.policy.desired_mount_point"><br>> type="string">/media/apacerht203</merge><br>> </match><br>> </match><br>> </match><br>> </match><br>> <br>> but so far I failed to set it for correct object, as I don't know how<br>> to propagete it to volume object.<br>> <br>> (Anyone willing to kick me in the right direction?)<br>> <br>> Vit<br>> _______________________________________________<br>> hal mailing list<br>> hal@lists.freedesktop.org<br>> http://lists.freedesktop.org/mailman/listinfo/hal<br>-- <br>John (J5) Palmieri <johnp@redhat.com><br><br>_______________________________________________<br>hal mailing
list<br>hal@lists.freedesktop.org<br>http://lists.freedesktop.org/mailman/listinfo/hal<br></johnp@redhat.com></key></udi_key></device></deviceinfo></blockquote><br></div><p>
        
                <hr size=1>Yahoo! Shopping<br>
Find Great Deals on Holiday Gifts at <a href="http://us.rd.yahoo.com/mail_us/footer/shopping/*http://shopping.yahoo.com/;_ylc=X3oDMTE2bzVzaHJtBF9TAzk1OTQ5NjM2BHNlYwNtYWlsdGFnBHNsawNob2xpZGF5LTA1
">Yahoo! Shopping</a>