summaryrefslogtreecommitdiff
path: root/multimedia/mmpython/files/patch-disc_discinfo.py
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/mmpython/files/patch-disc_discinfo.py')
-rw-r--r--multimedia/mmpython/files/patch-disc_discinfo.py22
1 files changed, 16 insertions, 6 deletions
diff --git a/multimedia/mmpython/files/patch-disc_discinfo.py b/multimedia/mmpython/files/patch-disc_discinfo.py
index 237958ec15af..0ccac5a03ad2 100644
--- a/multimedia/mmpython/files/patch-disc_discinfo.py
+++ b/multimedia/mmpython/files/patch-disc_discinfo.py
@@ -1,9 +1,17 @@
-
-$FreeBSD$
-
---- disc/discinfo.py.orig Thu Jun 10 20:51:51 2004
-+++ disc/discinfo.py Thu Jun 10 20:52:32 2004
-@@ -223,22 +223,10 @@
+--- disc/discinfo.py Sun Feb 8 17:44:05 2004
++++ disc/discinfo.py Thu Jun 17 00:04:48 2004
+@@ -191,7 +191,9 @@
+
+ fd = open(device, 'rb')
+ try:
+- fd.seek(0x0000832d)
++ fd.seek(32768) # 2048 multiple boundary for FreeBSD
++ # FreeBSD doesn't return IOError unless we try and read:
++ fd.read(1)
+ except IOError:
+ fd.close()
+ return 3
+@@ -223,22 +225,12 @@
else:
f = open(device,'rb')
@@ -23,6 +31,8 @@ $FreeBSD$
- id = id[813:829]
- else:
- label = f.read(32)
++ # FreeBSD can only seek to 2048 multiple boundaries.
++ # Below works on Linux and FreeBSD:
+ f.seek(32768)
+ id = f.read(829)
+ label = id[40:72]