home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / tools / developer-tools / aros / source / exec / devices / src / remdevice.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-16  |  1.4 KB  |  70 lines

  1. /*
  2.     (C) 1995, 96 AROS - The Amiga Replacement OS
  3.     $Id$
  4.     $Log$
  5.     Desc:
  6.     Lang: english
  7. */
  8. #include "exec_intern.h"
  9. #include <exec/devices.h>
  10. #include <aros/libcall.h>
  11. #include <dos/dos.h>
  12.  
  13. /*****************************************************************************
  14.  
  15.     NAME */
  16.     #include <clib/exec_protos.h>
  17.  
  18.     __AROS_LH1(void, RemDevice,
  19.  
  20. /*  SYNOPSIS */
  21.     __AROS_LA(struct Device *, device, A1),
  22.  
  23. /*  LOCATION */
  24.     struct ExecBase *, SysBase, 73, Exec)
  25.  
  26. /*  FUNCTION
  27.     Calls the given device's expunge vector, thus trying to delete it.
  28.     The device may refuse to do so and still be open after this call.
  29.  
  30.     INPUTS
  31.     device - Pointer to the device structure.
  32.  
  33.     RESULT
  34.  
  35.     NOTES
  36.  
  37.     EXAMPLE
  38.  
  39.     BUGS
  40.  
  41.     SEE ALSO
  42.     AddDevice(), OpenDevice(), CloseDevice().
  43.  
  44.     INTERNALS
  45.  
  46.     HISTORY
  47.  
  48. ******************************************************************************/
  49. {
  50.     __AROS_FUNC_INIT
  51.  
  52.     /* Arbitrate for the device list */
  53.     Forbid();
  54.  
  55.     /* Call expunge vector */
  56.     (void)__AROS_LC0(ULONG, expungeDevice,
  57.     struct Device *, device, 3, Device);
  58.     /*
  59.     Normally you'd expect the device to be expunged if this returns
  60.     non-zero, but this is only exec which doesn't know anything about
  61.     seglists - therefore dos.library has to SetFunction() into this
  62.     vector for the additional functionality.
  63.     */
  64.  
  65.     /* All done. */
  66.     Permit();
  67.     __AROS_FUNC_EXIT
  68. } /* RemDevice */
  69.  
  70.