ntdll: Enhance FreeBSD checks for cdrom code to also check for DragonFly BSD when appropriate.
This commit is contained in:
parent
ee82123bd4
commit
a8139f0ba1
|
@ -480,7 +480,7 @@ static NTSTATUS CDROM_SyncCache(int dev, int fd)
|
|||
cdrom_cache[dev].toc_good = 1;
|
||||
return STATUS_SUCCESS;
|
||||
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__DragonFly__)
|
||||
|
||||
int i, tsz;
|
||||
struct ioc_toc_header hdr;
|
||||
|
@ -791,7 +791,7 @@ static NTSTATUS CDROM_ResetAudio(int fd)
|
|||
{
|
||||
#if defined(linux)
|
||||
return CDROM_GetStatusCode(ioctl(fd, CDROMRESET));
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__DragonFly__)
|
||||
return CDROM_GetStatusCode(ioctl(fd, CDIOCRESET, NULL));
|
||||
#else
|
||||
FIXME("not supported on this O/S\n");
|
||||
|
@ -808,7 +808,7 @@ static NTSTATUS CDROM_SetTray(int fd, BOOL doEject)
|
|||
{
|
||||
#if defined(linux)
|
||||
return CDROM_GetStatusCode(ioctl(fd, doEject ? CDROMEJECT : CDROMCLOSETRAY));
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__DragonFly__)
|
||||
return CDROM_GetStatusCode((ioctl(fd, CDIOCALLOW, NULL)) ||
|
||||
(ioctl(fd, doEject ? CDIOCEJECT : CDIOCCLOSE, NULL)) ||
|
||||
(ioctl(fd, CDIOCPREVENT, NULL)));
|
||||
|
@ -830,7 +830,7 @@ static NTSTATUS CDROM_ControlEjection(int fd, const PREVENT_MEDIA_REMOVAL* rmv)
|
|||
{
|
||||
#if defined(linux)
|
||||
return CDROM_GetStatusCode(ioctl(fd, CDROM_LOCKDOOR, rmv->PreventMediaRemoval));
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__DragonFly__)
|
||||
return CDROM_GetStatusCode(ioctl(fd, (rmv->PreventMediaRemoval) ? CDIOCPREVENT : CDIOCALLOW, NULL));
|
||||
#else
|
||||
FIXME("not supported on this O/S\n");
|
||||
|
@ -985,7 +985,7 @@ static NTSTATUS CDROM_ReadQChannel(int dev, int fd, const CDROM_SUB_Q_DATA_FORMA
|
|||
|
||||
end:
|
||||
ret = CDROM_GetStatusCode(io);
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__DragonFly__)
|
||||
SUB_Q_HEADER* hdr = (SUB_Q_HEADER*)data;
|
||||
int io;
|
||||
struct ioc_read_subchannel read_sc;
|
||||
|
@ -1141,7 +1141,7 @@ static NTSTATUS CDROM_Verify(int dev, int fd)
|
|||
return STATUS_SUCCESS;
|
||||
else
|
||||
return STATUS_NO_MEDIA_IN_DEVICE;
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
|
||||
int ret;
|
||||
ret = ioctl(fd, CDIOCSTART, NULL);
|
||||
if(ret == 0)
|
||||
|
@ -1194,7 +1194,7 @@ static NTSTATUS CDROM_PlayAudioMSF(int fd, const CDROM_PLAY_AUDIO_MSF* audio_msf
|
|||
msf.cdmsf_min1, msf.cdmsf_sec1, msf.cdmsf_frame1);
|
||||
end:
|
||||
ret = CDROM_GetStatusCode(io);
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__DragonFly__)
|
||||
struct ioc_play_msf msf;
|
||||
int io;
|
||||
|
||||
|
@ -1239,7 +1239,7 @@ static NTSTATUS CDROM_SeekAudioMSF(int dev, int fd, const CDROM_SEEK_AUDIO_MSF*
|
|||
#if defined(linux)
|
||||
struct cdrom_msf0 msf;
|
||||
struct cdrom_subchnl sc;
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__DragonFly__)
|
||||
struct ioc_play_msf msf;
|
||||
struct ioc_read_subchannel read_sc;
|
||||
struct cd_sub_channel_info sc;
|
||||
|
@ -1292,7 +1292,7 @@ static NTSTATUS CDROM_SeekAudioMSF(int dev, int fd, const CDROM_SEEK_AUDIO_MSF*
|
|||
return CDROM_GetStatusCode(ioctl(fd, CDROMSEEK, &msf));
|
||||
}
|
||||
return STATUS_SUCCESS;
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__DragonFly__)
|
||||
read_sc.address_format = CD_MSF_FORMAT;
|
||||
read_sc.track = 0;
|
||||
read_sc.data_len = sizeof(sc);
|
||||
|
@ -1333,7 +1333,7 @@ static NTSTATUS CDROM_PauseAudio(int fd)
|
|||
{
|
||||
#if defined(linux)
|
||||
return CDROM_GetStatusCode(ioctl(fd, CDROMPAUSE));
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__DragonFly__)
|
||||
return CDROM_GetStatusCode(ioctl(fd, CDIOCPAUSE, NULL));
|
||||
#else
|
||||
FIXME(": not supported on this O/S\n");
|
||||
|
@ -1350,7 +1350,7 @@ static NTSTATUS CDROM_ResumeAudio(int fd)
|
|||
{
|
||||
#if defined(linux)
|
||||
return CDROM_GetStatusCode(ioctl(fd, CDROMRESUME));
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__DragonFly__)
|
||||
return CDROM_GetStatusCode(ioctl(fd, CDIOCRESUME, NULL));
|
||||
#else
|
||||
FIXME("not supported on this O/S\n");
|
||||
|
@ -1367,7 +1367,7 @@ static NTSTATUS CDROM_StopAudio(int fd)
|
|||
{
|
||||
#if defined(linux)
|
||||
return CDROM_GetStatusCode(ioctl(fd, CDROMSTOP));
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__DragonFly__)
|
||||
return CDROM_GetStatusCode(ioctl(fd, CDIOCSTOP, NULL));
|
||||
#else
|
||||
FIXME("not supported on this O/S\n");
|
||||
|
@ -1395,7 +1395,7 @@ static NTSTATUS CDROM_GetVolume(int fd, VOLUME_CONTROL* vc)
|
|||
vc->PortVolume[3] = volc.channel3;
|
||||
}
|
||||
return CDROM_GetStatusCode(io);
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__DragonFly__)
|
||||
struct ioc_vol volc;
|
||||
int io;
|
||||
|
||||
|
@ -1430,7 +1430,7 @@ static NTSTATUS CDROM_SetVolume(int fd, const VOLUME_CONTROL* vc)
|
|||
volc.channel3 = vc->PortVolume[3];
|
||||
|
||||
return CDROM_GetStatusCode(ioctl(fd, CDROMVOLCTRL, &volc));
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__DragonFly__)
|
||||
struct ioc_vol volc;
|
||||
|
||||
volc.vol[0] = vc->PortVolume[0];
|
||||
|
|
Loading…
Reference in New Issue