mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-26 19:00:34 +02:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user