Re: Questions about devices and input.

2006-08-14 Thread Dag-Erling Smørgrav
Sean Bryant [EMAIL PROTECTED] writes:
 I'm writing some cd buring software using burncd as a reference. I was
 wondering if its possible to detect opening and closing of the doors.

Unfortunately, no.  The drive may not even have a door.

DES
-- 
Dag-Erling Smørgrav - [EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Questions about devices and input.

2006-08-14 Thread Intron

Dag-Erling  [iso-8859-1] Smo/rgrav wrote:


Sean Bryant [EMAIL PROTECTED] writes:

I'm writing some cd buring software using burncd as a reference. I was
wondering if its possible to detect opening and closing of the doors.


Unfortunately, no.  The drive may not even have a door.

DES
--
Dag-Erling Smo/rgrav - [EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Mr. smo/rgrav loves playing joke very much. But most of CD/DVD drives
have a door, though generally speaking, software cannot detect the
open/close status of a door directly. However, software can command the
drive to open/close its door.

please see the source of cdcontrol(1):

/usr/src/usr.sbin/cdcontrol/cdcontrol.c

In the function int run (int cmd, char *arg):

 case CMD_CLOSE:
   ...
 case CMD_EJECT:
   ...


   From Beijing, China

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Questions about devices and input.

2006-08-14 Thread Dag-Erling Smørgrav
Intron [EMAIL PROTECTED] writes:
 Dag-Erling Smørgrav [EMAIL PROTECTED] writes:
  Sean Bryant [EMAIL PROTECTED] writes:
   I'm writing some cd buring software using burncd as a reference.
   I was wondering if its possible to detect opening and closing of
   the doors.
  Unfortunately, no.  The drive may not even have a door.
 Mr. smo/rgrav loves playing joke very much.

No.  Unlike you, I know what I'm talking about.

 But most of CD/DVD drives have a door, though generally speaking,
 software cannot detect the open/close status of a door directly.

http://www.plextor.com/english/products/716AL.htm

 However, software can command the drive to open/close its door.

This is not what Sean wants.

DES
-- 
Dag-Erling Smørgrav - [EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Questions about devices and input.

2006-08-14 Thread Intron

Dag-Erling  [iso-8859-1] Smo/rgrav wrote:


Intron [EMAIL PROTECTED] writes:

Dag-Erling Smo/rgrav [EMAIL PROTECTED] writes:
 Sean Bryant [EMAIL PROTECTED] writes:
  I'm writing some cd buring software using burncd as a reference.
  I was wondering if its possible to detect opening and closing of
  the doors.
 Unfortunately, no.  The drive may not even have a door.
Mr. smo/rgrav loves playing joke very much.


No.  Unlike you, I know what I'm talking about.


But most of CD/DVD drives have a door, though generally speaking,
software cannot detect the open/close status of a door directly.


http://www.plextor.com/english/products/716AL.htm


What I said is most of. This kind of drive may do harm to your
CD/DVD disc if you fail to operate carefully enough.




However, software can command the drive to open/close its door.


This is not what Sean wants.


I want to tell Sean that he is not worth spending time in finding
how to detect the open/close status of a drive door. If his program
can open/close/lock/unlock the door and detect whether recording medium
(CD/DVD) is present in drive or not and whether the drive is locked
or not, that's enough, just as Nero (www.nero.com) can do.



DES
--
Dag-Erling Smo/rgrav - [EMAIL PROTECTED]



   From Beijing, China

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Questions about devices and input.

2006-08-14 Thread Dag-Erling Smørgrav
Intron [EMAIL PROTECTED] writes:
 Dag-Erling Smørgrav [EMAIL PROTECTED] writes:
  Intron [EMAIL PROTECTED] writes:
   However, software can command the drive to open/close its door.
  This is not what Sean wants.
 I want to tell Sean that he is not worth spending time in finding
 how to detect the open/close status of a drive door.

I told him that in my first message, which you found so laughable.
How does ridiculing me help Sean?

DES
-- 
Dag-Erling Smørgrav - [EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Questions about devices and input.

2006-08-14 Thread Intron

Dag-Erling  [iso-8859-1] Smo/rgrav wrote:


Intron [EMAIL PROTECTED] writes:

Dag-Erling Smo/rgrav [EMAIL PROTECTED] writes:
 Intron [EMAIL PROTECTED] writes:
  However, software can command the drive to open/close its door.
 This is not what Sean wants.
I want to tell Sean that he is not worth spending time in finding
how to detect the open/close status of a drive door.


I told him that in my first message, which you found so laughable.
How does ridiculing me help Sean?

DES
--
Dag-Erling Smo/rgrav - [EMAIL PROTECTED]


Can your unilateral judgement give real help to Sean?

Actually, in the view of software programmer, that kind of no-drawer
drive has the same control mode as drawer drive.


   From Beijing, China

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Questions about devices and input.

2006-08-14 Thread Dag-Erling Smørgrav
Intron [EMAIL PROTECTED] writes:
 Dag-Erling Smo/rgrav [EMAIL PROTECTED] writes:
  How does ridiculing me help Sean?
 Can your unilateral judgement give real help to Sean?

Welcome to my kill file.  Enjoy your stay.

DES
-- 
Dag-Erling Smørgrav - [EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Questions about devices and input.

2006-08-14 Thread Intron

Dag-Erling  [iso-8859-1] Smo/rgrav wrote:


Intron [EMAIL PROTECTED] writes:

Dag-Erling Smo/rgrav [EMAIL PROTECTED] writes:
 How does ridiculing me help Sean?
Can your unilateral judgement give real help to Sean?


Welcome to my kill file.  Enjoy your stay.

DES
--
Dag-Erling Smo/rgrav - [EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


That's your own freedom to configure your own spam filter.


   From Beijing, China

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Questions about devices and input.

2006-08-14 Thread Sean Bryant

Thanks. Was just checking.
On 8/14/06, Dag-Erling Smørgrav [EMAIL PROTECTED] wrote:

Sean Bryant [EMAIL PROTECTED] writes:
 I'm writing some cd buring software using burncd as a reference. I was
 wondering if its possible to detect opening and closing of the doors.

Unfortunately, no.  The drive may not even have a door.

DES
--
Dag-Erling Smørgrav - [EMAIL PROTECTED]




--
Sean Bryant
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]

Re: Questions about devices and input.

2006-08-14 Thread Sean Bryant

How about when media is loaded. I have a detection routine that'll ask
for media, but what about when any media is loaded? Is there some kind
of event or some way I can be notified.
On 8/14/06, Dag-Erling Smørgrav [EMAIL PROTECTED] wrote:

Sean Bryant [EMAIL PROTECTED] writes:
 I'm writing some cd buring software using burncd as a reference. I was
 wondering if its possible to detect opening and closing of the doors.

Unfortunately, no.  The drive may not even have a door.

DES
--
Dag-Erling Smørgrav - [EMAIL PROTECTED]




--
Sean Bryant
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]

Re: Questions about devices and input.

2006-08-14 Thread Dag-Erling Smørgrav
Sean Bryant [EMAIL PROTECTED] writes:
 How about when media is loaded. I have a detection routine that'll ask
 for media, but what about when any media is loaded? Is there some kind
 of event or some way I can be notified.

Sorry, no.

DES
-- 
Dag-Erling Smørgrav - [EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Questions about devices and input.

2006-08-14 Thread Sean Bryant

Thanks anyway :(
On 8/14/06, Dag-Erling Smørgrav [EMAIL PROTECTED] wrote:

Sean Bryant [EMAIL PROTECTED] writes:
 How about when media is loaded. I have a detection routine that'll ask
 for media, but what about when any media is loaded? Is there some kind
 of event or some way I can be notified.

Sorry, no.

DES
--
Dag-Erling Smørgrav - [EMAIL PROTECTED]




--
Sean Bryant
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]

Re: Questions about devices and input.

2006-08-14 Thread Intron

The section 4.11.1 Removable Media Status Notification feature set
of ATA/ATAPI-7 (http://t13.org/docs2004/d1532v1r4b-ATA-ATAPI-7.pdf) reads,

d) Host system periodically checks media status using the GET MEDIA
   STATUS command to determine if any of the following events occurred:
- no media is present in the device (NM).
- media was changed since the last command (MC).
- a media change request has occurred (MCR).
- media is write protected (WP).


   From Beijing, China


Sean Bryant wrote:


Thanks anyway :(
On 8/14/06, Dag-Erling Smo/rgrav [EMAIL PROTECTED] wrote:

Sean Bryant [EMAIL PROTECTED] writes:
 How about when media is loaded. I have a detection routine that'll ask
 for media, but what about when any media is loaded? Is there some kind
 of event or some way I can be notified.

Sorry, no.

DES
--
Dag-Erling Smo/rgrav - [EMAIL PROTECTED]




--
Sean Bryant


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Questions about devices and input.

2006-08-14 Thread M. Warner Losh
In message: [EMAIL PROTECTED]
[EMAIL PROTECTED] (Dag-Erling Smørgrav) writes:
: Sean Bryant [EMAIL PROTECTED] writes:
:  How about when media is loaded. I have a detection routine that'll ask
:  for media, but what about when any media is loaded? Is there some kind
:  of event or some way I can be notified.
: 
: Sorry, no.

The only way is to poll the device from time to time :-(

Warner
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]