Codebase list hwinfo / 21e20e8
Update upstream source from tag 'upstream/21.80' Update to upstream version '21.80' with Debian dir 2d7ad8f32c83d485eadd94982592e23f9e830026 Tomasz Buchert 2 years ago
1 changed file(s) with 7 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
12771277
12781278 ci = hd->detail->cdrom.data;
12791279
1280 hd->is.notready = 1;
1281
1282 if((fd = open(hd->unix_dev_name, O_RDONLY|O_NONBLOCK)) > 0) {
1283 /* we get CDS_DISK_OK if there is CD in the drive */
1284 ioctl(fd, CDROM_DRIVE_STATUS, 0) == CDS_DISC_OK ? hd->is.notready = 0 : NULL;
1280 fd = open(hd->unix_dev_name, O_RDONLY|O_NONBLOCK);
1281
1282 /* we get CDS_DISK_OK if there is a CD in the drive */
1283 hd->is.notready = fd != -1 && ioctl(fd, CDROM_DRIVE_STATUS, 0) == CDS_DISC_OK ? 0 : 1;
1284
1285 if(hd->is.notready) {
1286 if(fd != -1) close(fd);
12851287 return NULL;
12861288 }
12871289