Docs » Autodocs » exec.library » RemDevice
RemDevice -- remove a device from the system
RemDevice(device) A1 void RemDevice(struct Device *);
This function calls the device's EXPUNGE vector, which requests that a device delete itself. The device may refuse to do this if it is busy or currently open. This is not typically called by user code. There are certain, limited circumstances where it may be appropriate to attempt to specifically flush a certain device. Example: /* Attempts to flush the named device out of memory. */ #include <exec/types.h> #include <exec/execbase.h> void FlushDevice(name) STRPTR name; { struct Device *result; Forbid(); if(result=(struct Device *)FindName(&SysBase->DeviceList,name)) RemDevice(result); Permit(); }
device - pointer to a device node
AddLibrary()
|