Marcus von Appen fixed bug 1529: CDROM detection misbehaviour for FreeBSD 7.x and newer

FreeBSD's device naming changed in several ways since FreeBSD 6.x. The attached
patch fixes the device naming scheme for FreeBSD 7 and newer (the currently
supported upstream version of FreeBSD).

--HG--
branch : SDL-1.2
This commit is contained in:
Sam Lantinga 2012-07-02 08:29:57 -04:00
parent f53c7b737f
commit 8ca80d20d2

View file

@ -188,7 +188,7 @@ int SDL_SYS_CDInit(void)
char *insert;
exists = 1;
for ( j=checklist[i][1]; exists; ++j ) {
SDL_snprintf(drive, SDL_arraysize(drive), "/dev/%sc", &checklist[i][3]);
SDL_snprintf(drive, SDL_arraysize(drive), "/dev/%s", &checklist[i][3]);
insert = SDL_strchr(drive, '?');
if ( insert != NULL ) {
*insert = j;