Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
dvd_drive_status [2014/02/16 20:59]
beandog
dvd_drive_status [2018/03/27 23:36]
beandog
Line 1: Line 1:
 ====== dvd_drive_status ====== ====== dvd_drive_status ======
  
-  * [[https://​raw2.github.com/​beandog/​dvd_tools/​master/​dvd_drive_status.c|dvd_drive_status.c]]+  ​* [[dvd_info]] package 
 +  * [[https://​github.com/​beandog/​dvd_info|dvd_info at github]] 
 + 
 +  ​* [[https://​raw2.github.com/​beandog/​dvd_info/​master/​dvd_drive_status.c|dvd_drive_status.c]]
  
 This program is a successor to the small program [[trayopen]] (which also inspired this one).  ''​trayopen''​ works great, but it doesn'​t poll two things: if the drive is busy or if it has media. ​ ''​dvd_drive_status''​ adds that feature plus a few more. This program is a successor to the small program [[trayopen]] (which also inspired this one).  ''​trayopen''​ works great, but it doesn'​t poll two things: if the drive is busy or if it has media. ​ ''​dvd_drive_status''​ adds that feature plus a few more.
  
-To build, just download the [[https://​raw2.github.com/​beandog/​dvd_tools/​master/​dvd_drive_status.c|dvd_drive_status.c file]] and compile it.+To build, just download the [[https://​raw2.github.com/​beandog/​dvd_info/​master/​dvd_drive_status.c|dvd_drive_status.c file]] and compile it.
  
 <​code>​ <​code>​
-$ wget https://​raw2.github.com/​beandog/​dvd_tools/​master/​dvd_drive_status.c+$ wget https://​raw2.github.com/​beandog/​dvd_info/​master/​dvd_drive_status.c
 $ gcc -o dvd_drive_status dvd_drive_status.c $ gcc -o dvd_drive_status dvd_drive_status.c
 </​code>​ </​code>​
Line 55: Line 58:
 === Scripting === === Scripting ===
  
-The [[https://​raw2.github.com/​beandog/​dvd_tools/​master/​dvd_drive_status.c|program]] reports status to stdout, but returns with an exit code indicating status as well.+The [[https://​raw2.github.com/​beandog/​dvd_info/​master/​dvd_drive_status.c|program]] reports status to stdout, but returns with an exit code indicating status as well.
  
 Here's the exit codes: Here's the exit codes:
Line 71: Line 74:
  
 If you just want to see if the **tray is closed and has media**, that would be exit code 4. If you just want to see if the **tray is closed and has media**, that would be exit code 4.
 +
 +=== Sample Script ===
  
 Here's a really simple shell script that you could use to wait until the device is ready to access: Here's a really simple shell script that you could use to wait until the device is ready to access:

Navigation