From 16bd45686e8f032d1b9311a7752e04e70dc29355 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 29 Sep 2008 15:31:43 +0000 Subject: (is_proper_device) split it out (needed for next commits) git-svn-id: http://svn.mandriva.com/svn/soft/draksnapshot/trunk@247017 99302b65-d5f7-0310-b3dd-f8cd6f4e3d94 --- draksnapshot-applet | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/draksnapshot-applet b/draksnapshot-applet index 9cc1c50..655886c 100755 --- a/draksnapshot-applet +++ b/draksnapshot-applet @@ -110,9 +110,7 @@ if ($dbus) { my $bool; eval { my $device = $hal->get_object(($msg->get_args_list)[0], "$hal_dn.Device"); - $bool = - $device->QueryCapability('volume') && !$device->GetProperty('volume.is_disc') && - $device->GetProperty('volume.is_mounted'); + $bool = is_proper_device($device); }; if ($bool) { my $time = time(); @@ -209,6 +207,12 @@ sub configure() { go2State('config_in_progress'); } +sub is_proper_device { + my ($device) = @_; + $device->QueryCapability('volume') && !$device->GetProperty('volume.is_disc') && + $device->GetProperty('volume.is_mounted'); +} + sub firstCheck() { my @discs = grep { $_->{usb_bus} && detect_devices::may_be_a_hd($_) } detect_devices::getSCSI(); -- cgit v1.2.1