[Pkg-utopia-commits] r1268 - in packages/unstable/hal/debian: . patches

Sjoerd Simons sjoerd at alioth.debian.org
Thu Mar 8 00:12:01 CET 2007


Author: sjoerd
Date: 2007-03-07 23:12:01 +0000 (Wed, 07 Mar 2007)
New Revision: 1268

Added:
   packages/unstable/hal/debian/patches/30_cdrom_bogus_tocinfo.patch
Modified:
   packages/unstable/hal/debian/changelog
Log:
* debian/patches/30_cdrom_bogus_tocinfo.patch
  - Added. Some cdrom drives/discs report a wrong start of the session in the
    TOC, causing hal to not detect the filesystem. Work around this by
    rescanning at offset 0 for discs when filesystem detection fails.

Modified: packages/unstable/hal/debian/changelog
===================================================================
--- packages/unstable/hal/debian/changelog	2007-03-07 22:09:57 UTC (rev 1267)
+++ packages/unstable/hal/debian/changelog	2007-03-07 23:12:01 UTC (rev 1268)
@@ -5,6 +5,10 @@
   * debian/patches/29_handle_non_hal_mounts.patch
     - Added. Handle volume removal for mounted volumed that weren't mounted by
       hal correctly.
+  * debian/patches/30_cdrom_bogus_tocinfo.patch
+    - Added. Some cdrom drives/discs report a wrong start of the session in the
+      TOC, causing hal to not detect the filesystem. Work around this by
+      rescanning at offset 0 for discs when filesystem detection fails.
 
   [ Michael Biebl ]
   * Add XS-Vcs-* fields to debian/control.
@@ -21,7 +25,7 @@
   * debian/watch
     - Fix regexp to not match non-hal releases, like hal-info.
 
- -- Michael Biebl <biebl at debian.org>  Wed,  7 Mar 2007 15:03:29 +0100
+ -- Sjoerd Simons <sjoerd at debian.org>  Wed,  7 Mar 2007 23:50:11 +0100
 
 hal (0.5.8.1-6.1) unstable; urgency=high
 

Added: packages/unstable/hal/debian/patches/30_cdrom_bogus_tocinfo.patch
===================================================================
--- packages/unstable/hal/debian/patches/30_cdrom_bogus_tocinfo.patch	2007-03-07 22:09:57 UTC (rev 1267)
+++ packages/unstable/hal/debian/patches/30_cdrom_bogus_tocinfo.patch	2007-03-07 23:12:01 UTC (rev 1268)
@@ -0,0 +1,32 @@
+commit 43e26dadd6610b8782248d7af727a7525fd55be6
+Author: Sjoerd Simons <sjoerd at luon.net>
+Date:   Wed Mar 7 23:21:54 2007 +0100
+
+    work around cd drives giving wrong TOC info
+    
+    Some cd/dvd drives give out wrong information when requesting the session
+    offset of certain drives. This causes hal to probe for a filesystem at the
+    wrong offset. Work around that by retrying the filesystem probe at offset 0 for discs if it failed.
+
+diff --git a/hald/linux/probing/probe-volume.c b/hald/linux/probing/probe-volume.c
+index a87bd31..d0f7354 100644
+--- a/hald/linux/probing/probe-volume.c
++++ b/hald/linux/probing/probe-volume.c
+@@ -586,7 +586,16 @@ main (int argc, char *argv[])
+ 		/* probe for file system */
+ 		vid = volume_id_open_fd (fd);
+ 		if (vid != NULL) {
+-			if (volume_id_probe_all (vid, vol_probe_offset , vol_size) == 0) {
++			int ret;
++			
++			ret = volume_id_probe_all (vid, vol_probe_offset , vol_size);
++			if (ret != 0 && is_disc && vol_probe_offset != 0) {
++		          /* Some cd-rom drives report the offset of the session in the cd's TOC wrong.
++			   * Fallback to probing at offset 0, just to be sure */
++			  ret = volume_id_probe_all (vid, 0 , vol_size);
++			}
++
++			if (ret == 0) {
+ 				set_volume_id_values(ctx, udi, cs, vid);
+ 			} else {
+ 				libhal_changeset_set_property_string (cs, "info.product", "Volume");




More information about the Pkg-utopia-commits mailing list