Busybox noch umgearbeitet... Sollte jetz die CD auswerfen...

git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@598 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
ms
2007-05-31 20:30:13 +00:00
parent 7b64cdd25d
commit 63978f8d6c
2 changed files with 24 additions and 35 deletions

View File

@@ -18,17 +18,10 @@ 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)
char command;
sprintf(command, "eject -r %s", dev);
if (mysystem(command))
return 0;
if (ioctl(fd, 0x5309) == -1)
{
close(fd);
return 0;
}
close(fd);
return 1;
else
return 1;
}