diff options
-rw-r--r-- | Changes | 2 | ||||
-rw-r--r-- | lib/Hal/Cdroms.pm | 10 |
2 files changed, 7 insertions, 5 deletions
@@ -1,3 +1,5 @@ + - switch from HAL to udisks (mga#3458 & #3639) + 0.03 Mon Mar 3 19:09:06 CET 2008 - ->mount and ->umount now work even the cdrom is listed in fstab, diff --git a/lib/Hal/Cdroms.pm b/lib/Hal/Cdroms.pm index 491bfa5..5a8ff38 100644 --- a/lib/Hal/Cdroms.pm +++ b/lib/Hal/Cdroms.pm @@ -44,7 +44,7 @@ Access cdroms through HAL and D-Bus. =cut # internal constant -my $hal_dn = 'org.freedesktop.Hal'; +my $hal_dn = 'org.freedesktop.UDisks'; =head2 Hal::Cdroms->new @@ -73,8 +73,8 @@ Returns the list of C<hal_path> of the cdroms (mounted or not). sub list { my ($o) = @_; - my $manager = $o->{hal}->get_object("/org/freedesktop/Hal/Manager", - "$hal_dn.Manager"); + my $manager = $o->{hal}->get_object("/org/freedesktop/UDisks", + $hal_dn); @{$manager->FindDeviceByCapability('volume.disc')}; } @@ -235,7 +235,7 @@ You can give an optional timeout in milliseconds. sub wait_for_insert { my ($o, $o_timeout) = @_; - _reactor_wait($o->{dbus}, "$hal_dn.Manager", $o_timeout, sub { + _reactor_wait($o->{dbus}, $hal_dn, $o_timeout, sub { my ($msg) = @_; $msg->get_member eq 'DeviceAdded' && ($msg->get_args_list)[0]; }); @@ -253,7 +253,7 @@ You can give an optional timeout in milliseconds. sub wait_for_mounted { my ($o, $o_timeout) = @_; - _reactor_wait($o->{dbus}, "$hal_dn.Device", $o_timeout, sub { + _reactor_wait($o->{dbus}, $hal_dn, $o_timeout, sub { my ($msg) = @_; $msg->get_member eq 'PropertyModified' or return; |