git-svn-id: http://svn.ipfire.org/svn/ipfire/IPFire/source@16 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

This commit is contained in:
ipfire
2006-02-15 21:15:54 +00:00
parent 6d63f4c4b3
commit cd1a292722
1206 changed files with 185026 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
/* SmoothWall install program.
*
* This program is distributed under the terms of the GNU General Public
* Licence. See the file COPYING for details.
*
* (c) Lawrence Manning, 2001
* CDROM menu. Get "misc" driver name etc.
*
* $Id: cdrom.c,v 1.6.2.1 2004/04/14 22:05:39 gespinasse Exp $
*
*/
#include "install.h"
extern FILE *flog;
extern char *mylog;
extern char **ctr;
/* Ejects the CDROM. returns 0 for failure, 1 for success. */
int ejectcdrom(char *dev)
{
int fd;
if ((fd = open(dev, O_RDONLY|O_NONBLOCK)) == -1)
return 0;
if (ioctl(fd, CDROMEJECT) == -1)
{
close(fd);
return 0;
}
close(fd);
return 1;
}