Add a 'mediaClose' script command to close the open media. An example use

would be to unmount the CD you installed from and prompt the user to
eject it before rebooting the machine.

Sponsored by:	The Weather Channel
This commit is contained in:
John Baldwin 2002-06-03 19:39:28 +00:00
parent 70225aabb7
commit 77218da374
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=97777
4 changed files with 28 additions and 0 deletions

View File

@ -45,6 +45,7 @@
static int dispatch_shutdown(dialogMenuItem *unused);
static int dispatch_systemExecute(dialogMenuItem *unused);
static int dispatch_msgConfirm(dialogMenuItem *unused);
static int dispatch_mediaClose(dialogMenuItem *unused);
static struct _word {
char *name;
@ -94,6 +95,7 @@ static struct _word {
{ "installVarDefaults", installVarDefaults },
{ "loadConfig", dispatch_load_file },
{ "loadFloppyConfig", dispatch_load_floppy },
{ "mediaClose", dispatch_mediaClose },
{ "mediaSetCDROM", mediaSetCDROM },
{ "mediaSetFloppy", mediaSetFloppy },
{ "mediaSetDOS", mediaSetDOS },
@ -205,6 +207,13 @@ dispatch_msgConfirm(dialogMenuItem *unused)
return DITEM_FAILURE;
}
static int
dispatch_mediaClose(dialogMenuItem *unused)
{
mediaClose();
return DITEM_SUCCESS;
}
static int
call_possible_resword(char *name, dialogMenuItem *value, int *status)
{

View File

@ -715,6 +715,11 @@ configuration file from another.
.It configFile
The fully qualified pathname of the file to load.
.El
.It mediaClose
If a media device is open, close it.
.Pp
.Sy Variables :
None
.It mediaSetCDROM
Select a
.Fx

View File

@ -45,6 +45,7 @@
static int dispatch_shutdown(dialogMenuItem *unused);
static int dispatch_systemExecute(dialogMenuItem *unused);
static int dispatch_msgConfirm(dialogMenuItem *unused);
static int dispatch_mediaClose(dialogMenuItem *unused);
static struct _word {
char *name;
@ -94,6 +95,7 @@ static struct _word {
{ "installVarDefaults", installVarDefaults },
{ "loadConfig", dispatch_load_file },
{ "loadFloppyConfig", dispatch_load_floppy },
{ "mediaClose", dispatch_mediaClose },
{ "mediaSetCDROM", mediaSetCDROM },
{ "mediaSetFloppy", mediaSetFloppy },
{ "mediaSetDOS", mediaSetDOS },
@ -205,6 +207,13 @@ dispatch_msgConfirm(dialogMenuItem *unused)
return DITEM_FAILURE;
}
static int
dispatch_mediaClose(dialogMenuItem *unused)
{
mediaClose();
return DITEM_SUCCESS;
}
static int
call_possible_resword(char *name, dialogMenuItem *value, int *status)
{

View File

@ -715,6 +715,11 @@ configuration file from another.
.It configFile
The fully qualified pathname of the file to load.
.El
.It mediaClose
If a media device is open, close it.
.Pp
.Sy Variables :
None
.It mediaSetCDROM
Select a
.Fx