PATCH: /dlls/ntdll/cdrom.c -- portability breakage
Eric Pouech
pouech-eric at wanadoo.fr
Tue Apr 1 12:46:53 CST 2003
Waldeck Schutzer wrote:
> Hi Eric,
>
> I think this should fix this portability issue. I think it should
> probably be harmless to define CDROM_MSF for non-linux platforms since I
> suppse that is the prefered format for Windows. The proposed patch is
> attached.
According to MS docs, the FormatCode seem to have a different meaning on
Windows than on Linux or *BSD
This patch should take care of this (as well as of the *BSD breakage)
A+
--
Eric Pouech
-------------- next part --------------
Name: cdrom
ChangeLog: Fixed a few FormatCode entries
License: X11
GenDate: 2003/04/01 18:45:11 UTC
ModifiedFiles: dlls/ntdll/cdrom.c
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/dlls/ntdll/cdrom.c,v
retrieving revision 1.27
diff -u -u -r1.27 cdrom.c
--- dlls/ntdll/cdrom.c 20 Mar 2003 21:59:50 -0000 1.27
+++ dlls/ntdll/cdrom.c 1 Apr 2003 18:44:04 -0000
@@ -778,7 +778,7 @@
case IOCTL_CDROM_CURRENT_POSITION:
size = sizeof(SUB_Q_CURRENT_POSITION);
if (hdr->AudioStatus==AUDIO_STATUS_IN_PROGRESS) {
- data->CurrentPosition.FormatCode = sc.cdsc_format;
+ data->CurrentPosition.FormatCode = IOCTL_CDROM_CURRENT_POSITION;
data->CurrentPosition.Control = sc.cdsc_ctrl;
data->CurrentPosition.ADR = sc.cdsc_adr;
data->CurrentPosition.TrackNumber = sc.cdsc_trk;
@@ -890,7 +890,7 @@
case IOCTL_CDROM_CURRENT_POSITION:
size = sizeof(SUB_Q_CURRENT_POSITION);
if (hdr->AudioStatus==AUDIO_STATUS_IN_PROGRESS) {
- data->CurrentPosition.FormatCode = sc.what.position.data_format;
+ data->CurrentPosition.FormatCode = IOCTL_CDROM_CURRENT_POSITION;
data->CurrentPosition.Control = sc.what.position.control;
data->CurrentPosition.ADR = sc.what.position.addr_type;
data->CurrentPosition.TrackNumber = sc.what.position.track_number;
@@ -914,12 +914,12 @@
case IOCTL_CDROM_MEDIA_CATALOG:
size = sizeof(SUB_Q_MEDIA_CATALOG_NUMBER);
data->MediaCatalog.FormatCode = IOCTL_CDROM_MEDIA_CATALOG;
- data->MediaCatalog.FormatCode = sc.what.media_catalog.data_format;
data->MediaCatalog.Mcval = sc.what.media_catalog.mc_valid;
memcpy(data->MediaCatalog.MediaCatalog, sc.what.media_catalog.mc_number, 15);
break;
case IOCTL_CDROM_TRACK_ISRC:
size = sizeof(SUB_Q_CURRENT_POSITION);
+ data->TrackIsrc.FormatCode = IOCTL_CDROM_TRACK_ISRC;
data->TrackIsrc.Tcval = sc.what.track_info.ti_valid;
memcpy(data->TrackIsrc.TrackIsrc, sc.what.track_info.ti_number, 15);
break;
@@ -1045,7 +1045,7 @@
if (i <= toc.FirstTrack || i > toc.LastTrack+1)
return STATUS_INVALID_PARAMETER;
i--;
- cp->FormatCode = CDROM_MSF;
+ cp->FormatCode = IOCTL_CDROM_CURRENT_POSITION;
cp->Control = toc.TrackData[i-toc.FirstTrack].Control;
cp->ADR = toc.TrackData[i-toc.FirstTrack].Adr;
cp->TrackNumber = toc.TrackData[i-toc.FirstTrack].TrackNumber;
More information about the wine-patches
mailing list