Add a 'monitor' verb to the udisks command
If we run these commands
# mkfs.vfat -n "foo" /dev/mmcblk0p1
mkfs.vfat 3.0.9 (31 Jan 2010)
# mount /dev/mmcblk0p1 /media/Foo5/
# umount /media/Foo5
# dd if=/dev/zero of=/dev/mmcblk0p1 bs=512 count=100
100+0 records in
100+0 records out
51200 bytes (51 kB) copied, 0.0327893 s, 1.6 MB/s
then we get this output
$ udisks monitor
Monitoring the udisks daemon. Press Ctrl+C to exit.
17:44:08.566: The udisks-daemon is running (name-owner :1.267).
17:44:15.418: /org/freedesktop/UDisks/devices/mmcblk0p1: Received signal org.freedesktop.UDisks.LinuxSysfsDevice::UEvent (b'change',)
17:44:15.419: /org/freedesktop/UDisks/devices/mmcblk0p1: Added interface org.freedesktop.UDisks.BlockDevice.Probed
17:44:15.420: /org/freedesktop/UDisks/devices/mmcblk0p1: Added interface org.freedesktop.UDisks.Filesystem
17:44:15.421: /org/freedesktop/UDisks/devices/mmcblk0p1: org.freedesktop.UDisks.BlockDevice: Properties Changed
Symlinks: /dev/block/179:1
/dev/disk/by-id/mmc-SD01G_0x50882907-part1
/dev/disk/by-path/pci-0000:05:00.2-part1
/dev/disk/by-uuid/E2F3-2C42
/dev/disk/by-label/foo
17:44:24.466: /org/freedesktop/UDisks/devices/mmcblk0p1: org.freedesktop.UDisks.Filesystem: Properties Changed
MountPoint: /media/Foo5
17:44:29.582: /org/freedesktop/UDisks/devices/mmcblk0p1: org.freedesktop.UDisks.Filesystem: Properties Changed
MountPoint:
17:44:34.586: /org/freedesktop/UDisks/devices/mmcblk0p1: Received signal org.freedesktop.UDisks.LinuxSysfsDevice::UEvent (b'change',)
17:44:34.589: /org/freedesktop/UDisks/devices/mmcblk0p1: Removed interface org.freedesktop.UDisks.BlockDevice.Probed
17:44:34.589: /org/freedesktop/UDisks/devices/mmcblk0p1: Removed interface org.freedesktop.UDisks.Filesystem
17:44:34.589: /org/freedesktop/UDisks/devices/mmcblk0p1: org.freedesktop.UDisks.BlockDevice: Properties Changed
Symlinks: /dev/block/179:1
/dev/disk/by-id/mmc-SD01G_0x50882907-part1
/dev/disk/by-path/pci-0000:05:00.2-part1
which is actually very nice.
Signed-off-by: David Zeuthen <davidz@redhat.com>