Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
dvd_drive_status [2014/02/17 03:59] – beandog | dvd_drive_status [2014/03/13 17:56] – beandog |
---|
====== dvd_drive_status ====== | ====== dvd_drive_status ====== |
| |
* [[https://raw2.github.com/beandog/dvd_tools/master/dvd_drive_status.c|dvd_drive_status.c]] | * [[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> |
=== 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: |