Hi Dischi,

on Freitag 10 Oktober 2008, Dirk Meyer wrote:
> Author: dmeyer
> Date: Fri Oct 10 14:07:16 2008
> New Revision: 3605
>
> Log:
> use hal methods to mount, umount and eject

First of all, I have uninstalled dbus-python to be able to confirm that there
are better error messages now:
> 2008-10-14 15:23:41,568 [ERROR] devices(51): No module named dbus
> 2008-10-14 15:23:41,569 [ERROR] devices(52): HAL support disabled
Thanks!

However, the current hal support does not do better than the old code;
to the contrary, hal's error message is even missing a "not": ;-)

2008-10-14 09:27:13,713 [ERROR] async(390): Unhandled InProgress exception:
Traceback (most recent call last):
  File "../base/build/lib.linux-i686-2.5/kaa/notifier/thread.py", line 358, in 
_execute
  File "../base/build/lib.linux-i686-2.5/kaa/notifier/callback.py", line 191, 
in __call__
  File "/usr/lib/python2.5/site-packages/kaa/beacon/server/hal.py", line 107, 
in mount
    vol.Mount('', self.prop.get('volume.fstype'), [])
  File "/usr/lib/python2.5/site-packages/dbus/proxies.py", line 68, in 
__call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python2.5/site-packages/dbus/proxies.py", line 140, in 
__call__
    **keywords)
  File "/usr/lib/python2.5/site-packages/dbus/connection.py", line 607, in 
call_blocking
    message, timeout)
DBusException: org.freedesktop.Hal.Device.Volume.PermissionDenied: 
Device /dev/hdc is listed 
in /etc/fstab. Refusing to mount.

Nevertheless, KDE is able to perform the mount (presumably via HAL) properly,
so my idea was to look at their code:
http://websvn.kde.org/branches/KDE/3.5/kdebase/kioslave/media/mediamanager/halbackend.cpp?revision=864963&view=markup

However, they're using libhal, so the interaction via DBUS is a little hidden
AFAICS.  OTOH, the isInFstab function uses the suspicious flag
KMountPoint::NeedRealDeviceName of KMountPoint, which would be here:
http://websvn.kde.org/branches/KDE/3.5/kdelibs/kdecore/kmountpoint.cpp?view=markup
So obviously, KDE scans fstab (via fstab.h's API if available) and explicitly
resolves symlinks.

But it also has fallback code for devices that are not in fstab, so that may
be completely unimportant.

-- 
Ciao, /  /                                                    .o.
     /--/                                                     ..o
    /  / ANS                                                  ooo

Attachment: signature.asc
Description: This is a digitally signed message part.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to