Is extra USB event possible in FreeBSD 8?
Sagara Wijetunga
sagara at tomahawk.com.sg
Fri Jul 17 12:14:23 UTC 2009
Hans Petter Selasky writes:
>> Hi FreeBSD community
>>
>> In case if my earlier post was not clear, here are bit more detail to
>> explain my question.
>>
>> We want to catch device creation USB events at the devd and take actions as
>> specified in following devd rules:
>>
>> attach 200 {
>> match "vendor" "0x0718";
>> match "product" "0x0081";
>> match "sernum" "14925B00";
>> device-name "da[0-9]+";
>> action "action $device-name otherparams";
>> };
>
> It is not USB that creates /dev/daXXX. This is done by the CAM layer and its
> subsystems. Also the CAM layer does not have any place to supply such
> information. What we could possibly do is to fake a SCSI command providing the
> CAM layer with the required information.
>
> Else, are you aware about disk-labels, to uniquely identify disks?
>
Hi Hans Petter
Thank you very much for your prompt reply.
Regarding "disk-labels", is it "label:" tag you specify for bsdlabel with -A
option?
If it is, this option is out. Almost all of the USB mass storage devices,
eg. USB flash disks, cameras, audio players, etc. are already formatted. We
cannot ask users to format first (ie. in FreeBSD terms create disk lables,
create files systems, etc) before use as it make no sense at all. Eg. One
buy a camera at the airport, take photos on a tour, after the tour wants to
transfer photos to the computer. Now its too late to create labels.
Therefore, your first option sounds interesting. I'm not sure is it the
correct way forward. As you are the USB expert, could you recommend the
correct solution?
Best regards
Sagara
More information about the freebsd-current
mailing list