/*			DEALUN
 * De-allocate the specified lun, returning it to the LUN table
 *  Returns 0 on OK or -1 on error
 *
 */

dealun(lun)
int lun;	/* lun to de-allocate */
{
	/* if lun is valid, then de-allocate it and return 0 else return -1 */
	if (lun<=$$nlun) {
		*($$luns+(lun-2))=0;
		return(0);
	}
	return(-1);
}
