From: molivier Date: Wed, 14 Apr 2004 06:02:02 +0000 (+0000) Subject: The Linux CD module now uses O_NONBLOCK when opening the CDROM device to avoid failur... X-Git-Tag: xonotic-v0.1.0preview~5918 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9a267bb45d80c8ec803bbc3c4f9ffaf630d6b903;p=xonotic%2Fdarkplaces.git The Linux CD module now uses O_NONBLOCK when opening the CDROM device to avoid failure if there's no CD in the player git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4102 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cd_linux.c b/cd_linux.c index 6e6525eb..feaa5b3a 100644 --- a/cd_linux.c +++ b/cd_linux.c @@ -202,7 +202,7 @@ void CDAudio_SysInit (void) int CDAudio_SysStartup (void) { - if ((cdfile = open(cd_dev, O_RDONLY)) == -1) + if ((cdfile = open(cd_dev, O_RDONLY | O_NONBLOCK)) == -1) { Con_DPrintf("CDAudio_SysStartup: open of \"%s\" failed (%i)\n", cd_dev, errno);