CDROM patch - take 2 (was: no subject)

Paul Millar paulm at
Sun May 12 15:22:06 CDT 2002

On Sun, 12 May 2002, Francois Gouget wrote:
> See also the patch I sent there:

Sorry Francois, I had read your email but missed the bottom half of your
patch.  I've altered the patch so it just augments yours. Now it just adds
the configure test for the timeout member, defining HAVE_CDROM_TIMEOUT if
it exists.

  Add test to check if cdrom_generic_command has the timeout member.

NB configure and include/ must be regenerated after this patch.

> Note that you don't need to set cmd.quiet to 0 since you did a memset
> just before. So you only need the configure check for the timeout field.

True, but I was anticipating that this might be set to some other value in
the future. Having the test would illustrate the potential problem, but
I think you're right to get ride of the assignment.

> > I don't know
> > the knock-on effects for not setting these values, but presumably getting
> > something to work is better than wine not compiling :)
> I don't know. It could be seen as sweeping the bug under the carpet.
> Also it will probably make it quite hard to find out what's wrong.

I think the bug is lack of support in earlier kernels, which we have
limited control over.  We could issue a warning during the configure stage
that there might be problems with CDROM drives, but if wine uses features
only present in recent kernels, then there will always be this "sweeping
bugs under the carpet" problem ... e.g. kernel-2.[56] support for EA and
hidden files.

Paul Millar

-------------- next part --------------
RCS file: /home/wine/wine/,v
retrieving revision 1.37
diff -u -r1.37
---	12 May 2002 03:16:39 -0000	1.37
+++	12 May 2002 19:31:31 -0000
@@ -1079,6 +1079,24 @@
+dnl **** cdrom IOCTL checks ****
+AC_CACHE_CHECK( [whether cdrom_generic_command in linux/cdrom.h defines timeout],
+		wine_cdrom_linux_cdrom_has_timeout,
+   #include <linux/cdrom.h>
+   ],[
+        struct cdrom_generic_command gen_command;
+        gen_command.timeout = 0;
+   ],wine_cdrom_linux_cdrom_has_timeout=yes,wine_cdrom_linux_cdrom_has_timeout=no
+   )
+if test "$wine_cdrom_linux_cdrom_has_timeout" = "yes"
+            [Define if the cdrom_generic_command struct defined by <sys/vfs.h> has the member timeout])
 dnl **** statfs checks ****
 if test "$ac_cv_header_sys_vfs_h" = "yes"

More information about the wine-patches mailing list