Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Jun 2004 08:44:52 -0700
From:      "Jacob S. Barrett" <jbarrett@amduat.net>
To:        freebsd-current@freebsd.org
Subject:   devd and usb
Message-ID:  <200406110844.52444.jbarrett@amduat.net>

next in thread | raw e-mail | index | archive | help
Should the vendor and product codes be accessable in devd.  I have seen 
examples while searching Google that suggest that they should be, but they 
don't appear to be.  The problem is that I have two devices that get 
recognized as ucom devices, my Visor and my cell phone.  Obviously the 
actions I want to purform when they are detected are very different.  I tried 
matching based on vendor and product codes, but that doesn't work.  The codes 
are not available when devd processes the attach event.

Below is a snippet of my devd/visor.conf and the debug output from devd.  You 
can see that devd doesn't have a vendor code for this event.  Am I doing 
something wrong?

devd/visor.conf:
attach 10 {
        device-name "ucom[0-9]+";
        match "vendor" "0x082d";
        match "product" "0x0100";
        action "chmod 0666 /dev/$device-name";
        action "ln -sf /dev/$device-name /dev/visor";
};

devd debug:
Processing event '+ucom0 at  on uhub0'
Pushing table
device-name=ucom0
Processing attach event
Testing device-name=ucom0 against ^ed50
Testing device-name=ucom0 against ^ucom[0-9]+
Testing vendor= against ^0x082d
Testing device-name=ucom0 against ^(an|ar|ath|aue|awi|bfe|bge|cm|cnw|cs|cue|
dc|de|ed|el|em|ep|ex|fe|fxp|gem|gx|hme|ie|kue|lge|lnc|my|nge|pcn|ray|re|rl|
rue|sf|sis|sk|sn|snc|ste|ti|tl|tx|txp|vr|vx|wb|wi|xe|xl|bwe)[0-9]+
Testing device-name=ucom0 against ^(adv|advw|aic|aha|ahb|ahc|ahd|bt|ct|iir|
isp|mly|mpt|ncv|nsp|stg|sym|wds)[0-9]+
Testing device-name=ucom0 against ^ukbd0
Popping table

-- 
Jacob S. Barrett
jbarrett@amduat.net
www.amduat.net

"I don't suffer from insanity, I enjoy every minute of it."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406110844.52444.jbarrett>