PATCH: fix dlls/ntdll/cdrom.c breakage

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Wed Jun 16 10:14:53 CDT 2004


>>>>> "Gerald" == Gerald Pfeifer <gerald at pfeifer.com> writes:

    Gerald> The following patch to dlls/ntdll/cdrom.c revision 1.46 date:
    Gerald> 2004/06/15 00:45:01; author: julliard; state: Exp; lines: +421
    Gerald> -1 Uwe Bonnes <bon at elektron.ikp.physik.tu-darmstadt.de> Support
    Gerald> for reading encrypted DVDs.

    Gerald> causes a build failure on all FreeBSD (and it seems also NetBSD)
    Gerald> platforms:

    Gerald>   cdrom.c: In function `DVD_EndSession': cdrom.c:1739: error:
    Gerald> `dev' undeclared (first use in this function) cdrom.c:1739:
    Gerald> error: (Each undeclared identifier is reported only once
    Gerald> cdrom.c:1739: error: for each function it appears in.)
    Gerald> cdrom.c:1739: error: `rmv' undeclared (first use in this
    Gerald> function) gmake[2]: *** [cdrom.o] Error 1 gmake[2]: Leaving
    Gerald> directory `/.amd_mnt/nashira/files5/test/wine/dlls/ntdll'
    Gerald> gmake[1]: *** [ntdll] Error 2

    Gerald> There is BSD-specific code in this function, but both dev and
    Gerald> rmv do not appear anywhere, so I guess this was copied from
    Gerald> somewhere else and then not adjusted?

The Non-Linux side of the patch was never tested. Appended patch return
STATUS_NOT_SUPPORTED for that code clause and should make the code compile
again. 

Gerald, can you perhaps have a look at the implementation of the BSD parts? 
libdvdcss should have all the needed calls somewhere.

Bye
-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
Index: wine/dlls/ntdll/cdrom.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/cdrom.c,v
retrieving revision 1.46
diff -u -w -r1.46 cdrom.c
--- wine/dlls/ntdll/cdrom.c	15 Jun 2004 00:45:01 -0000	1.46
+++ wine/dlls/ntdll/cdrom.c	16 Jun 2004 15:11:00 -0000
@@ -1736,7 +1736,8 @@
     TRACE("\n");
     return CDROM_GetStatusCode(ioctl(fd, DVD_AUTH, &auth_info));
 #elif defined(__FreeBSD__) || defined(__NetBSD__)
-    return CDROM_GetStatusCode(ioctl(cdrom_cache[dev].fd, (rmv->PreventMediaRemoval) ? CDIOCPREVENT : CDIOCALLOW, NULL));
+    TRACE("bsd\n");
+    return STATUS_NOT_SUPPORTED;
 #else
     return STATUS_NOT_SUPPORTED;
 #endif



More information about the wine-patches mailing list