Bug fix: /dev/sr0 was accepted as enumerable address on Linux 2.4

This commit is contained in:
Thomas Schmitt 2008-09-29 07:35:30 +00:00
parent c2c2499862
commit 78642d08ae
2 changed files with 4 additions and 1 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2008.09.28.193802"
#define Cdrskin_timestamP "2008.09.28.211741"

View File

@ -1216,6 +1216,9 @@ static int proc_sys_dev_cdrom_info(char ***list, int *count, int flag)
return 1;
*count = 0;
sg_evaluate_kernel();
if (sg_kernel_age < 2) /* addresses are not suitable for kernel 2.4 */
return 1;
fp = fopen("/proc/sys/dev/cdrom/info", "r");
if (fp == NULL)
return 0;