Alters a device switch entry point in the device switch table.
#include <sys/types.h> #include <sys/errno.h> #include <sys/device.h>
int devswchg (devno, type, newfunc, oldfunc); dev_t devno; int type; int (*newfunc) (); int (**oldfunc)();
devno | Specifies the major and minor device numbers of the device to be changed. | ||||||||||||||||
type | Specifies the device switch entry point to alter. The type parameter can have one of the following values:
| ||||||||||||||||
newfunc | Specifies the new value for the device switch entry point. | ||||||||||||||||
oldfunc | Specifies that the old value of the device switch entry point be returned here. |
The devswchg kernel service alters the value of a device switch entry point (function pointer) after a device switch table entry has been added by the devswadd kernel service. The device switch entry point specified by the type parameter is set to the value of the newfunc parameter. Its previous value is returned in the memory addressed by the oldfunc parameter. Only one device switch entry can be altered per call.
If the devswchg kernel service is unsuccessful, the value referenced by the oldfunc parameter is not defined.
The devswchg kernel service can be called from the process environment only.
0 | Indicates a successful operation. |
EINVAL | Indicates the Type command was not valid. |
ENODEV | Indicates the device switch entry specified by the devno parameter is not defined. |
The devswchg kernel service is part of Base Operating System (BOS) Runtime.
The devswadd kernel service.
List of Kernel Extension and Device Driver Management Kernel Services and How Device Drivers are Accessed in AIX Version 4.3 Kernel Extensions and Device Support Programming Concepts.