Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Aug 2009 19:54:37 +0000
From:      Michal <ml@infosec.pl>
To:        freebsd-questions@freebsd.org
Subject:   digital camera and devd
Message-ID:  <4A8DA9FD.6080904@infosec.pl>

next in thread | raw e-mail | index | archive | help
Hello,

I've got a Canon digital camera set up and working with gphoto2 via 
devfs+devd but it's not elegant/clean enough:

attach 0 {
  device-name "ugen[0-9]+";
  match "vendor" "0x0123";
  match "product" "0x3210";
  match "sernum" "1234567890";
  action "devfs rule -s 10 add 100 path $device-name* user joe; \
  devfs rule -s 10 add 200 path usb[0-9] user joe; \
  devfs rule -s 10 applyset";
};

Problem with this solution is that it changes owner for all /dev/usb 
files i.e. usb, usb0, usb1, usb2 and usb3.

How can I check exactly which /dev/usb* entry corresponds to my camera?
And by the way /dev/usb3 means port 3, hub 3 or what are they?
Tried with:
usb_number=`sysctl dev.ugen.0.%location | cut -d '=' -f 2` but it turns 
out that it's not what I'm looking for because sometimes when it returns 
  "2" then I still need write access to just /dev/usb3.

Any ideas please?
Michal
-- 
"Power tends to corrupt, and absolute power corrupts absolutely." -John 
Dalberg-Acton




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