Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Jan 2001 14:16:07 +0300
From:      "Artem Koutchine" <matrix@ipform.ru>
To:        <questions@FreeBSD.ORG>
Cc:        <hardware@FreeBSD.ORG>
Subject:   Detecting a cd media inertion by polling
Message-ID:  <013d01c07578$41954200$0c00a8c0@ipform.ru>

next in thread | raw e-mail | index | archive | help
Hello!

I tried to impliment a cd detection by polling the cd-rom device
every second. But i failed. The problem is that opening 
/dev/acd0c is always  success even if the media is not inserted,
even read() is sucessfull, it just read 0 bytes. I could use mount()
call to try to mount cd9660, but that seems to be an overkill.

Any idea how to detect media insertion reliably and properly?

Artem



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hardware" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?013d01c07578$41954200$0c00a8c0>