[geromanas@mailas.com: Bug#315757: libhal-storage0:
libhal-storage.c:hal_volume_from_udi():vol->disk_type is not
set correctly for DVD+R and DVD+RW disks (typos)]
Sjoerd Simons
sjoerd at luon.net
Thu Jun 30 14:32:07 PDT 2005
----- Forwarded message from Modestas Vainius <geromanas at mailas.com> -----
Date: Sat, 25 Jun 2005 19:09:21 +0300
From: Modestas Vainius <geromanas at mailas.com>
Subject: Bug#315757: libhal-storage0: libhal-storage.c:hal_volume_from_udi():vol->disk_type is not set correctly for DVD+R and DVD+RW disks (typos)
To: Debian Bug Tracking System <submit at bugs.debian.org>
Reply-To: Modestas Vainius <geromanas at mailas.com>, 315757 at bugs.debian.org
X-Mailer: reportbug 3.15
Package: libhal-storage0
Version: 0.4.8-2
Severity: important
Tags: patch
hal-spec claims, that:
volume.disc.type (string) Yes This property specifies the physical type of the disc
...
dvd_plus_r DVD+R disc
dvd_plus_rw DVD+RW disc
...
However, in libhal-storage.c:hal_volume_from_udi() we have
(as of 0.4.8-2):
} else if (strcmp (disc_type_textual, "dvd_plusr") == 0) {
vol->disc_type = HAL_VOLUME_DISC_TYPE_DVDPLUSR;
} else if (strcmp (disc_type_textual, "dvd_plusrw") == 0) {
vol->disc_type = HAL_VOLUME_DISC_TYPE_DVDPLUSRW;
}
As you see, there are two typos (dvd_plusr - should be dvd_plus_r,
and dvd_plusrw - should be dvd_plus_rw), which prevent a disk type
to be set for DVD+R and DVD+RW disks. As a result, KDE 3.4 media
manager misrecognize those disks, claiming they are CD-ROMs.
The attached patch fixes the typos. It should be put in debian/patches.
The patched hal compiles without any problems with pbuilder and KDE 3.4
media manager behaves as expected after installing it. Please include it
in the next hal revision, because the nature of the bug may trick the people
heavily relying on the info provided by Hal/KDE/Gnome into thinking that
their DVD drive is faulty (yes, I had this thought!). I'm not sure
whether the bug is worth fixing in sarge. It's very trivial and just can't
break anything.
----- End forwarded message -----
Sjoerd
--
If the master dies and the disciple grieves, the lives of both have
been wasted.
-------------- next part --------------
diff -uNr hal-0.4.8.old/libhal-storage/libhal-storage.c hal-0.4.8/libhal-storage/libhal-storage.c
--- hal-0.4.8.old/libhal-storage/libhal-storage.c 2005-06-25 18:26:30.000000000 +0300
+++ hal-0.4.8/libhal-storage/libhal-storage.c 2005-06-25 18:27:41.000000000 +0300
@@ -1028,9 +1028,9 @@
vol->disc_type = HAL_VOLUME_DISC_TYPE_DVDR;
} else if (strcmp (disc_type_textual, "dvd_rw") == 0) {
vol->disc_type = HAL_VOLUME_DISC_TYPE_DVDRW;
- } else if (strcmp (disc_type_textual, "dvd_plusr") == 0) {
+ } else if (strcmp (disc_type_textual, "dvd_plus_r") == 0) {
vol->disc_type = HAL_VOLUME_DISC_TYPE_DVDPLUSR;
- } else if (strcmp (disc_type_textual, "dvd_plusrw") == 0) {
+ } else if (strcmp (disc_type_textual, "dvd_plus_rw") == 0) {
vol->disc_type = HAL_VOLUME_DISC_TYPE_DVDPLUSRW;
}
}
-------------- next part --------------
_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal
More information about the Hal
mailing list