Detach a major and minor number
#include <sys/rsrcdbmgr.h> #include <sys/rsrcdbmsg.h> int rsrcdbmgr_devno_detach( dev_t devno, int flags );
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The function rsrcdbmgr_devno_detach() detaches device number that was attached with rsrcdbmgr_devno_attach(). The process that's detaching the device number must be the process that attached it.
|In order to successfully use the rsrcdbmgr_*() functions to modify the resource database, your process must run as root.|
If you don't detach a device, it's released when the process that attached it terminates.
#include <sys/rsrcdbmgr.h> #include <sys/rsrcdbmsg.h> dev_t dev_num; int flags=0; … rsrcdbmgr_devno_detach( dev_num, flags );