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).
1.1 --- a/src/cdrom/freebsd/SDL_syscdrom.c Sun Jun 03 05:03:45 2012 -0400
1.2 +++ b/src/cdrom/freebsd/SDL_syscdrom.c Mon Jul 02 08:29:57 2012 -0400
1.3 @@ -188,7 +188,7 @@
1.4 char *insert;
1.5 exists = 1;
1.6 for ( j=checklist[i][1]; exists; ++j ) {
1.7 - SDL_snprintf(drive, SDL_arraysize(drive), "/dev/%sc", &checklist[i][3]);
1.8 + SDL_snprintf(drive, SDL_arraysize(drive), "/dev/%s", &checklist[i][3]);
1.9 insert = SDL_strchr(drive, '?');
1.10 if ( insert != NULL ) {
1.11 *insert = j;