Testwise inquiry of ioctl(CDROM_MEDIA_CHANGED) (disabled by default)

This commit is contained in:
Thomas Schmitt 2008-02-21 20:10:38 +00:00
parent bccb39efd8
commit 13492efe4b
2 changed files with 23 additions and 1 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2008.02.16.121102" #define Cdrskin_timestamP "2008.02.21.200956"

View File

@ -308,6 +308,28 @@ static int sg_close_drive_fd(char *fname, int driveno, int *fd, int sorry)
if(*fd < 0) if(*fd < 0)
return(0); return(0);
#ifdef CDROM_MEDIA_CHANGED_disabled_because_not_helpful
#ifdef CDSL_CURRENT
/* ts A80217 : wondering whether the os knows about our activities */
ret = ioctl(*fd, CDROM_MEDIA_CHANGED, CDSL_CURRENT);
sprintf(msg, "ioctl(CDROM_MEDIA_CHANGED) == %d", ret);
libdax_msgs_submit(libdax_messenger, driveno, 0x00000002,
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_HIGH, msg, 0, 0);
#ifdef BLKFLSBUF_disabled_because_not_helpful
ret = ioctl(*fd, BLKFLSBUF, 0);
sprintf(msg, "ioctl(BLKFLSBUF) == %d", ret);
os_errno = 0;
if(ret == -1)
os_errno = errno;
libdax_msgs_submit(libdax_messenger, driveno, 0x00000002,
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_HIGH, msg, os_errno,0);
#endif /* BLKFLSBUF */
#endif /* CDSL_CURRENT */
#endif /* CDROM_MEDIA_CHANGED */
ret = close(*fd); ret = close(*fd);
*fd = -1337; *fd = -1337;
if(ret != -1) { if(ret != -1) {