hal mount/unmount flash drive using dbus-send
Григорий
AntonovGA at yandex.ru
Tue Mar 3 00:44:44 PST 2009
Good day,
my goal is to mount/unmount flash drive usng hal over dbus in some program, but even using "standard" dbus-send command for mounting/unmounting causing error message,
dbus-send --system --print-reply --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/volume_uuid_EAEC_055A org.freedesktop.Hal.Device.Volume.Unmount
where /org/freedesktop/Hal/devices/volume_uuid_EAEC_055A is udi of my usb flash, exactly volume not device.
error
Error org.freedesktop.DBus.Error.UnknownMethod: Method "Unmount" with signature "" on interface "org.freedesktop.Hal.Device.Volume" doesn't exist
I tried under user, under root, on debian, ubuntu.
The question is what point i've missed, or how to enable more debug output from hal or dbus?
Because according hal-spec http://people.freedesktop.org/~david/hal-spec/hal-spec.html#interface-device-volume
there are mount and unmount commands and they even throw different exceptions.
dbus-send with methods like GetProperty{String,Boolean,Integer,Double,etc} - works fine as GetAllDevices and other stuff.
hal version 0.5.11
dbus version 1.1.20
lshal output >>>
udi = '/org/freedesktop/Hal/devices/volume_uuid_EAEC_055A'
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_JetFlash_TS512MJF2B_61100740F336732E_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_JetFlash_TS512MJF2B_61100740F336732E_0_0' (string)
info.product = 'A737-PL' (string)
info.udi = '/org/freedesktop/Hal/devices/volume_uuid_EAEC_055A' (string)
linux.hotplug_type = 3 (0x3) (int)
linux.sysfs_path = '/sys/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)
storage.model = '' (string)
volume.block_size = 512 (0x200) (int)
volume.fstype = 'vfat' (string)
volume.fsusage = 'filesystem' (string)
volume.fsversion = 'FAT32' (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 = 'A737-PL' (string)
volume.linux.is_device_mapper = false (bool)
volume.mount.valid_options = {'ro', 'sync', 'dirsync', 'noatime', 'nodiratime', 'noexec', 'quiet', 'remount', 'exec', 'utf8', 'shortname=', 'codepage=', 'iocharset=', 'umask=', 'dmask=', 'fmask=', 'uid=', 'flush'} (string list)
volume.mount_point = '' (string)
volume.num_blocks = 1022944 (0xf9be0) (int)
volume.partition.flags = {'boot'} (string list)
volume.partition.label = '' (string)
volume.partition.media_size = 524288000 (0x1f400000) (uint64)
volume.partition.number = 1 (0x1) (int)
volume.partition.scheme = 'mbr' (string)
volume.partition.start = 16384 (0x4000) (uint64)
volume.partition.type = '0x0b' (string)
volume.partition.uuid = '' (string)
volume.size = 523747328 (0x1f37c000) (uint64)
volume.unmount.valid_options = {'lazy'} (string list)
volume.uuid = 'EAEC-055A' (string)
--
thanks,
Grigory
More information about the hal
mailing list