Hello,
On Sunday 17 December 2006 00:33, you wrote:
> Hello again,
>
> It's been a while, but I've finally got around to testing your patches on
> KDE 3.5.5 on FreeBSD 5.5.
I don't have FreeBSD 5.5 for the moment, but I can install it to see, what's
wrong with hal in it.
>
> There seems to be a problem: If I read the halbackend code right (and I
> might have got it wrong), media:/ only lists devices of the type 'volume'
> (except for floppies and floppy-alikes), which leads me to believe
> kio_media relies on some sort of automounter/autoscanner to actually be
> able to work for cdroms.
You're quite right about the 'volume' type of listed devices, cdrom 'volumes'
have property 'volume.is_disc' set 'true'. This is validated in 'void
HALBackend::setVolumeProperties(Medium* medium)' method through hal
function 'libhal_volume_is_disc(halVolume)'.
>
> In any case: None of my cdrom drives show up, empty or loaded, mounted or
> not. Were you actually able to see and mount cdroms from media:/? Could it
> be that this particular part of HAL only works on FreeBSD 6?
It's possible. Let's check it up, what is the reply on:
$ hal-find-by-capability --capability volume
should I load a cd and type this, a list of volumes udis appears with the
cdrom's udi as well. See attached file with output:
hal-find-by-capability.txt
In this list my data cd with volume-id "My Disc" has
udi: /org/freedesktop/Hal/devices/volume_label_My_Disc_________
Then I run 'hal-device' with my cd udi to get a list of propertys of this
volume:
$ hal-device /org/freedesktop/Hal/devices/volume_label_My_Disc_________
See attached file with output: hal-device.txt
Your loaded cd is supposed to be listed in the same way. If it is not, then a
problem seems to come out with hal on FreeBSD 5.5.
Actually, I've revised my patch for HALBackend to make it smaller and
simpler :) Now it relies only on cd type data, got from HAL, without any
additional functions. See attached file with the patch: kdebase3.diff
/org/freedesktop/Hal/devices/volume_size_536870912
/org/freedesktop/Hal/devices/volume_size_2147483648_0
/org/freedesktop/Hal/devices/volume_size_17179869184
/org/freedesktop/Hal/devices/volume_size_2147483648
/org/freedesktop/Hal/devices/volume_size_6974147072
/org/freedesktop/Hal/devices/volume_part1_size_28985854464
/org/freedesktop/Hal/devices/volume_size_16106127360
/org/freedesktop/Hal/devices/volume_size_204964723200
/org/freedesktop/Hal/devices/volume_part2_size_221070850560
/org/freedesktop/Hal/devices/volume_size_80023716864
/org/freedesktop/Hal/devices/volume_part1_size_80023716864
/org/freedesktop/Hal/devices/volume_label_My_Disc_________
udi = '/org/freedesktop/Hal/devices/volume_label_My_Disc_________'
volume.mount.valid_options = { 'ro', 'noexec', 'extatt', 'gens', 'nojoliet',
'norrip', 'nostrictjoliet' } (string list)
org.freedesktop.Hal.Device.Volume.method_execpaths = { 'hal-storage-mount',
'hal-system-storage-unmount', 'hal-system-storage-eject' } (string list)
org.freedesktop.Hal.Device.Volume.method_signatures = { 'ssas', 'as', 'as' }
(string list)
org.freedesktop.Hal.Device.Volume.method_names = { 'Mount', 'Unmount',
'Eject' } (string list)
info.interfaces = { 'org.freedesktop.Hal.Device.Volume' } (string list)
block.storage_device =
'/org/freedesktop/Hal/devices/storage_serial_9JB5U150F153269241PP' (string)
info.product = 'My Disc ' (string)
info.udi = '/org/freedesktop/Hal/devices/volume_label_My_Disc_________'
(string)
block.is_volume = true (bool)
volume.mount_point = '' (string)
volume.is_mounted_read_only = false (bool)
volume.is_mounted = false (bool)
volume.num_blocks = 358065 (0x576b1) (uint64)
volume.size = 733317120 (0x2bb58800) (uint64)
volume.block_size = 2048 (0x800) (uint64)
volume.uuid = '' (string)
volume.label = 'My Disc ' (string)
volume.fsversion = 'Joliet Extension' (string)
volume.fstype = 'iso9660' (string)
volume.fsusage = 'filesystem' (string)
volume.ignore = false (bool)
volume.is_partition = false (bool)
volume.is_disc = true (bool)
volume.disc.capacity = 735051776 (0x2bd00000) (uint64)
volume.disc.type = 'cd_r' (string)
volume.disc.is_rewritable = false (bool)
volume.disc.is_blank = false (bool)
volume.disc.is_appendable = false (bool)
volume.disc.is_videodvd = false (bool)
volume.disc.is_svcd = false (bool)
volume.disc.is_vcd = false (bool)
volume.disc.has_data = true (bool)
volume.disc.has_audio = false (bool)
block.minor = 84 (0x54) (int)
block.major = 0 (0x0) (int)
block.device = '/dev/acd0' (string)
info.category = 'volume.disc' (string)
info.bus = 'block' (string)
info.capabilities = { 'block', 'volume', 'volume.disc' } (string list)
info.parent =
'/org/freedesktop/Hal/devices/storage_serial_9JB5U150F153269241PP' (string)
diff -rubdBN kdebase3.orig/Makefile kdebase3/Makefile
--- kdebase3.orig/Makefile Wed Oct 18 14:24:45 2006
+++ kdebase3/Makefile Fri Dec 15 20:09:27 2006
@@ -22,6 +22,8 @@
xmkmf:${X_IMAKE_PORT}
LIB_DEPENDS= sasl2:${PORTSDIR}/security/cyrus-sasl2 \
smbclient:${PORTSDIR}/net/samba-libsmbclient \
+ dbus-qt-1.1:${PORTSDIR}/devel/dbus-qt3 \
+ hal.1:${PORTSDIR}/sysutils/hal \
usb-0.1:${PORTSDIR}/devel/libusb
CONFLICTS= kdeartwork-3.[2-3]* kdelibs-3.[0-4]* kdeutils-3.[0-2]*
@@ -46,7 +48,7 @@
LDCONFIG_DIRS+= %%PREFIX%%/lib %%PREFIX%%/lib/kde3
CONFIGURE_ENV+= RUN_KAPPFINDER=no kde_cv_utmp_file=/var/run/utmp
-CONFIGURE_ARGS+=--without-hal \
+CONFIGURE_ARGS+=--with-hal \
--without-java \
--with-qt-dir=${X11BASE} \
--with-xdmdir=${X11BASE}/lib/X11/xdm \
diff -rubdBN kdebase3.orig/files/patch-kioslave_media_mediamanager-halbackend.cpp kdebase3/files/patch-kioslave_media_mediamanager-halbackend.cpp
--- kdebase3.orig/files/patch-kioslave_media_mediamanager-halbackend.cpp Thu Jan 1 03:00:00 1970
+++ kdebase3/files/patch-kioslave_media_mediamanager-halbackend.cpp Mon Dec 18 22:50:00 2006
@@ -0,0 +1,50 @@
+--- kioslave/media/mediamanager/halbackend.cpp.orig Mon Dec 18 22:25:46 2006
++++ kioslave/media/mediamanager/halbackend.cpp Mon Dec 18 22:45:24 2006
+@@ -17,7 +17,6 @@
+ */
+
+ #include "halbackend.h"
+-#include "linuxcdpolling.h"
+
+ #include <stdlib.h>
+
+@@ -407,28 +406,23 @@
+ else
+ mimeType = "media/dvd" + MOUNT_SUFFIX;
+
+- if (libhal_volume_disc_has_audio(halVolume) && !libhal_volume_disc_has_data(halVolume))
+- {
+- mimeType = "media/audiocd";
+- medium->unmountableState( "audiocd:/?device=" + QString(libhal_volume_get_device_file(halVolume)) );
+- }
+-
+- medium->setIconName(QString::null);
+-
+ /* check if the disc id a vcd or a video dvd */
+- DiscType type = LinuxCDPolling::identifyDiscType(libhal_volume_get_device_file(halVolume));
+- switch (type)
++ if (libhal_volume_disc_has_data(halVolume))
+ {
+- case DiscType::VCD:
++ if (libhal_device_get_property_bool(m_halContext, udi, "volume.disc.is_vcd", NULL))
+ mimeType = "media/vcd";
+- break;
+- case DiscType::SVCD:
++ else if (libhal_device_get_property_bool(m_halContext, udi, "volume.disc.is_svcd", NULL))
+ mimeType = "media/svcd";
+- break;
+- case DiscType::DVD:
++ else if (libhal_device_get_property_bool(m_halContext, udi, "volume.disc.is_videodvd", NULL))
+ mimeType = "media/dvdvideo";
+- break;
+ }
++ else if (libhal_volume_disc_has_audio(halVolume))
++ {
++ mimeType = "media/audiocd";
++ medium->unmountableState( "audiocd:/?device=" + QString(libhal_volume_get_device_file(halVolume)) );
++ }
++
++ medium->setIconName(QString::null);
+ }
+ else
+ {
_______________________________________________
kde-freebsd mailing list
[email protected]
http://kf.liquidneon.com/mailman/listinfo/kde-freebsd