[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Halevt-dev] Using parent values in exec attribute
From: |
Marcus Habermehl |
Subject: |
Re: [Halevt-dev] Using parent values in exec attribute |
Date: |
Sun, 21 Mar 2010 21:02:44 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100319 Thunderbird/3.0.3 |
Am 21.03.2010 20:16, schrieb Patrice Dumas:
On Sun, Mar 21, 2010 at 05:01:59PM +0100, Marcus Habermehl wrote:
Hi.
Is it possible to use the values of parent devices in an exec attribute?
The documentation says it's possible to use it in the match
attribute. But if I'm try to use it in the exec attribute I get
UNKNOWN.
That means that it cannot be found (or maybe it is empty, I don't know
for sure).
No, they aren't empty.
As example:
<halevt:Device match="hal.info.parent.hal.storage.drive_type = sd_mmc">
<halevt:Insertion exec="echo
"$hal.block.storage_device.hal.storage.vendor$">
/tmp/insertion"/>
</halevt:Device>
Can you send the lshal result, when the device is inserted, or,
at least, the lshal -u for the device and the parent?
This is the lshal -u output for the device (1) and den parent device (2).
% lshal -u /org/freedesktop/Hal/devices/volume_uuid_0102_0304
udi = '/org/freedesktop/Hal/devices/volume_uuid_0102_0304'
block.device = '/dev/sdb1' (string)
block.is_volume = true (bool)
block.major = 8 (0x8) (int)
block.minor = 17 (0x11) (int)
block.storage_device =
'/org/freedesktop/Hal/devices/storage_serial_Generic_USB_SD_Reader_920321111113_0_0'
(string)
info.capabilities = {'volume', 'block'} (string list)
info.category = 'volume' (string)
info.interfaces = {'org.freedesktop.Hal.Device.Volume'} (string list)
info.parent =
'/org/freedesktop/Hal/devices/storage_serial_Generic_USB_SD_Reader_920321111113_0_0'
(string)
info.product = 'Volume (vfat)' (string)
info.udi = '/org/freedesktop/Hal/devices/volume_uuid_0102_0304' (string)
linux.hotplug_type = 3 (0x3) (int)
linux.sysfs_path =
'/sys/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host6/target6:0:0/6:0:0:0/block/sdb/sdb1'
(string)
org.freedesktop.Hal.Device.Volume.method_argnames = {'mount_point
fstype extra_options', 'extra_options', 'extra_options'} (string list)
org.freedesktop.Hal.Device.Volume.method_execpaths =
{'hal-storage-mount', 'hal-storage-unmount', 'hal-storage-eject'}
(string list)
org.freedesktop.Hal.Device.Volume.method_names = {'Mount', 'Unmount',
'Eject'} (string list)
org.freedesktop.Hal.Device.Volume.method_signatures = {'ssas', 'as',
'as'} (string list)
volume.block_size = 512 (0x200) (int)
volume.fstype = 'vfat' (string)
volume.fsusage = 'filesystem' (string)
volume.fsversion = 'FAT16' (string)
volume.ignore = false (bool)
volume.is_disc = false (bool)
volume.is_mounted = false (bool)
volume.is_mounted_read_only = false (bool)
volume.is_partition = true (bool)
volume.label = '' (string)
volume.linux.is_device_mapper = false (bool)
volume.mount.valid_options = {'ro', 'sync', 'dirsync', 'noatime',
'nodiratime', 'relatime', 'noexec', 'quiet', 'remount', 'exec', 'utf8',
'shortname=', 'codepage=', 'iocharset=', 'umask=', 'dmask=', 'fmask=',
'uid=', 'flush'} (string list)
volume.mount_point = '' (string)
volume.num_blocks = 245405 (0x3be9d) (uint64)
volume.partition.media_size = 125698048 (0x77e0000) (uint64)
volume.partition.number = 1 (0x1) (int)
volume.partition.start = 50688 (0xc600) (uint64)
volume.size = 125647360 (0x77d3a00) (uint64)
volume.unmount.valid_options = {'lazy'} (string list)
volume.uuid = '0102-0304' (string)
% lshal -u
/org/freedesktop/Hal/devices/storage_serial_Generic_USB_SD_Reader_920321111113_0_0
udi =
'/org/freedesktop/Hal/devices/storage_serial_Generic_USB_SD_Reader_920321111113_0_0'
block.device = '/dev/sdb' (string)
block.is_volume = false (bool)
block.major = 8 (0x8) (int)
block.minor = 16 (0x10) (int)
block.storage_device =
'/org/freedesktop/Hal/devices/storage_serial_Generic_USB_SD_Reader_920321111113_0_0'
(string)
info.addons = {'hald-addon-storage'} (string list)
info.capabilities = {'storage', 'block'} (string list)
info.category = 'storage' (string)
info.interfaces = {'org.freedesktop.Hal.Device.Storage.Removable'}
(string list)
info.parent =
'/org/freedesktop/Hal/devices/usb_device_58f_6377_920321111113_if0_scsi_host_scsi_device_lun0'
(string)
info.product = 'USB SD Reader' (string)
info.udi =
'/org/freedesktop/Hal/devices/storage_serial_Generic_USB_SD_Reader_920321111113_0_0'
(string)
info.vendor = 'Generic' (string)
linux.hotplug_type = 3 (0x3) (int)
linux.sysfs_path =
'/sys/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host6/target6:0:0/6:0:0:0/block/sdb'
(string)
storage.automount_enabled_hint = true (bool)
storage.bus = 'usb' (string)
storage.drive_type = 'sd_mmc' (string)
storage.firmware_version = '1.00' (string)
storage.hotpluggable = true (bool)
storage.lun = 0 (0x0) (int)
storage.media_check_enabled = true (bool)
storage.model = 'USB SD Reader' (string)
storage.no_partitions_hint = false (bool)
storage.originating_device =
'/org/freedesktop/Hal/devices/usb_device_58f_6377_920321111113_if0'
(string)
storage.partitioning_scheme = 'mbr' (string)
storage.removable = true (bool)
storage.removable.media_available = true (bool)
storage.removable.media_size = 125698048 (0x77e0000) (uint64)
storage.removable.support_async_notification = false (bool)
storage.requires_eject = false (bool)
storage.serial = 'Generic_USB_SD_Reader_920321111113-0:0' (string)
storage.size = 0 (0x0) (uint64)
storage.vendor = 'Generic' (string)
Greetings
Marcus