/* Retrieve the serial number of the specified ISDN controller or (for @contr == 0) the driver itself. Return value: CAPI result code  */
u16 capi20_get_serial(u32 contr, u8 *serial)
/* Retrieve the serial number of the specified ISDN controller or (for @contr == 0) the driver itself. Return value: CAPI result code  */
u16 capi20_get_serial(u32 contr, u8 *serial)
{
	struct capi_ctr *card;
	if (contr == 0) {
		strlcpy(serial, driver_serial, CAPI_SERIAL_LEN);
		return CAPI_NOERROR;
	}
	card = get_capi_ctr_by_nr(contr);
	if (!card || card->cardstate != CARD_RUNNING) 
		return CAPI_REGNOTINSTALLED;
	strlcpy((void *) serial, card->serial, CAPI_SERIAL_LEN);
	return CAPI_NOERROR;
}