dbus/udisks guru? Import record should store information about card
Bug #692449 reported by
Jason Gerard DeRose
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Dmedia |
Fix Released
|
High
|
David Green |
Bug Description
The import record should store information about the SD/SDHC/CF card being imported from. This provides a rich audit trail for pro use.
Information should be extracted using the udisks Device interface - http://
We primarily want to extract information about the disk, not the partition. An example of the sort of information we want to extract:
size: 16005169152
vendor: Lexar
model: CFUDMASD
revision: 1000
serial: AA0000000009019
Related branches
lp:~david4dev/dmedia/udisks
- Jason Gerard DeRose: Approve
-
Diff: 801 lines (+503/-22)8 files modifieddmedia/importer.py (+14/-2)
dmedia/schema.py (+245/-12)
dmedia/tests/test_core.py (+2/-0)
dmedia/tests/test_importer.py (+3/-1)
dmedia/tests/test_schema.py (+17/-6)
dmedia/udisks.py (+146/-0)
dmedia/views.py (+57/-1)
misc/debug-udisks.py (+19/-0)
Changed in dmedia: | |
importance: | Medium → High |
Changed in dmedia: | |
milestone: | 0.3 → 0.4 |
tags: | added: bitesize |
Changed in dmedia: | |
milestone: | 0.4 → 0.5 |
Changed in dmedia: | |
milestone: | 0.5 → 0.7 |
Changed in dmedia: | |
milestone: | 0.7 → 0.8 |
Changed in dmedia: | |
assignee: | nobody → David Green (david4dev) |
Changed in dmedia: | |
status: | Triaged → In Progress |
tags: |
added: udisk removed: udisks |
Changed in dmedia: | |
milestone: | 11.08 → 11.09 |
Changed in dmedia: | |
milestone: | 11.09 → 11.10 |
Changed in dmedia: | |
milestone: | 11.10 → 11.11 |
To post a comment you must log in.
Are you sure to use udisk? I have actually never heard about this.
I would recommend udev to query it (Don't believe blindly in me, I have pretty much less idea)
$ udevadm info -a -p $(udevadm info -q path -n /dev/sdb)
You get
Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/devices/ pci0000: 00/0000: 00:1d.7/ usb1/1- 1/1-1:1. 0/host6/ target6: 0:0/6:0: 0:0/block/ sdb': ="block" range}= ="16" ext_range} =="256" removable} =="0" size}== "976773168" alignment_ offset} =="0" discard_ alignment} =="0" capability} =="50" inflight} ==" 0 0"
KERNEL=="sdb"
SUBSYSTEM=
DRIVER==""
ATTR{
ATTR{
ATTR{
ATTR{ro}=="0"
ATTR{
ATTR{
ATTR{
ATTR{
ATTR{stat}==" 3369 73783 402729 83260 0 0 0 0 0 35968 83252"
ATTR{
looking at parent device '/devices/ pci0000: 00/0000: 00:1d.7/ usb1/1- 1/1-1:1. 0/host6/ target6: 0:0/6:0: 0:0': ="6:0:0: 0" ="scsi" device_ blocked} =="0" type}== "0" scsi_level} =="3" vendor} =="Seagate " model}= ="Portable " rev}==" 0130" state}= ="running" timeout} =="30" iocounterbits} =="32" iorequest_ cnt}==" 0xd5a" iodone_ cnt}==" 0xd5a" ioerr_cnt} =="0x20" modalias} =="scsi: t-0x00" evt_media_ change} =="0" dh_state} =="detached" queue_depth} =="1" queue_type} =="none" max_sectors} =="240"
KERNELS=
SUBSYSTEMS=
DRIVERS=="sd"
ATTRS{
ATTRS{
ATTRS{
ATTRS{
ATTRS{
ATTRS{
ATTRS{
ATTRS{
ATTRS{
ATTRS{
ATTRS{
ATTRS{
ATTRS{
ATTRS{
ATTRS{
ATTRS{
ATTRS{
ATTRS{
looking at parent device '/devices/ pci0000: 00/0000: 00:1d.7/ usb1/1- 1/1-1:1. 0/host6/ target6: 0:0': ="target6: 0:0" ="scsi"
KERNELS=
SUBSYSTEMS=
DRIVERS==""
looking at parent device '/devices/ pci0000: 00/0000: 00:1d.7/ usb1/1- 1/1-1:1. 0/host6' : ="host6" ="scsi"
KERNELS=
SUBSYSTEMS=
DRIVERS==""
looking at parent device '/devices/ pci0000: 00/0000: 00:1d.7/ usb1/1- 1/1-1:1. 0': ="1-1:1. 0" ="usb" ="usb-storage" bInterfaceNumbe r}=="00" bAlternateSetti ng}==" 0" bNumEndpoints} =="02" bInterfaceClass }=="08" bInterfaceSubCl ass}==" 06" bInterfaceProto col}==" 50" modalias} =="usb: v0BC2p2300d0130 dc00dsc00dp00ic 08isc06ip50" supports_ autosuspend} =="0"
KERNELS=
SUBSYSTEMS=
DRIVERS=
ATTRS{
ATTRS{
ATTRS{
ATTRS{
ATTRS{
ATTRS{
ATTRS{
ATTRS{
looking at parent device '/devices/ pci0000: 00/0000: 00:1d.7/ usb1/1- 1': ="usb" configuration} =="" bNumInterfaces} ==" 1" bConfigurationV alue}== "1" bmAttributes} =="80" bMaxPower} =="100mA" urbnum} =="10360" idVendor} =="0bc2" idProduct} =="2300" bcdDevice} =="0130" bDeviceClass} =="00" bDeviceSubClass }=="00" bDeviceProtocol }=="00" bNumConfigurati ons}==" 1" bMaxPacketSize0 }=="64" speed}= ="480" busnum} =="1" devnum} =="13"
KERNELS=="1-1"
SUBSYSTEMS=
DRIVERS=="usb"
ATTRS{
ATTRS{
ATTRS{
ATTRS{
ATTRS{
ATTRS{
ATTRS{
ATTRS{
ATTRS{
ATTRS{
ATTRS{
ATTRS{
ATTRS{
ATTRS{
ATTRS{
ATTRS{
ATTRS{
...