From: Paul Powell <moloch16@yahoo.com>
To: linux-kernel@vger.kernel.org
Subject: Ioctl CDROMRESET has no effect
Date: Wed, 7 Feb 2001 08:34:32 -0800 (PST) [thread overview]
Message-ID: <20010207163432.25823.qmail@web114.yahoomail.com> (raw)
I'm attempting to reset a CDROM using the CDROMRESET
ioctl. The reset command only seems to reset the
device if the device is not mounted. If the device is
mounted, the reset command seems to have no effect.
With the device unmounted, sending the reset command
causes the drive to become active and I see the
activity light light up. With the device mounted, the
activity light does nothing. I also can't open the
CD-ROM drive using the eject button after resetting a
mounted CD.
It seems the reset command should work even if the OS
thinks the device is mounted for error recovery.
Here is my test program:
#include <stdio.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <linux/cdrom.h>
int main(int argc, char* argv[])
{
int fd, result;
fd = open("/dev/hda", O_RDONLY|O_NONBLOCK);
if (fd < 0)
{
perror("open");
return fd;
}
result = ioctl(fd, CDROMRESET, 1);
if (result < 0)
perror("ioctl");
close(fd);
return 0;
}
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next reply other threads:[~2001-02-07 16:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-07 16:34 Paul Powell [this message]
2001-02-07 16:40 ` Ioctl CDROMRESET has no effect Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010207163432.25823.qmail@web114.yahoomail.com \
--to=moloch16@yahoo.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox