ATAPI_DEBUG_PRINT(("acd_size: %ld %ld\n",blksize,size)); return size;
ATAPI_DEBUG_PRINT(("acd_size: %ld %ld\n", acd->params.blksize, acd->params.disksize)); return acd->params.disksize;
acd_size(acd, flags)	struct acd_softc *acd;	int flags;{	struct atapi_read_cd_capacity_data rdcap;	struct atapi_read_cd_capacity cmd;	u_long blksize;	u_long size;	if (acd->ad_link->quirks & AQUIRK_NOCAPACITY) {		/*		 * the drive doesn't support the READ_CD_CAPACITY command		 * use a fake size		 */		acd->params.blksize = 2048;		acd->params.disksize = 400000;		return 400000;	}	/*	 * make up a atapi command and ask the atapi driver to do	 * it for you.	 */	bzero(&cmd, sizeof(cmd));	cmd.opcode = ATAPI_READ_CD_CAPACITY;	cmd.len = sizeof(rdcap);	/*	 * If the command works, interpret the result as a 4 byte	 * number of blocks and a blocksize	 */	if (atapi_exec_cmd(acd->ad_link, &cmd, sizeof(cmd),	    &rdcap, sizeof(rdcap), B_READ, 0) != 0) {		ATAPI_DEBUG_PRINT(("ATAPI_READ_CD_CAPACITY failed\n"));		return 0;	}	acd->params.blksize = _4btol((u_int8_t*)&rdcap.blksize);	acd->params.disksize = _4btol((u_int8_t*)&rdcap.size);	ATAPI_DEBUG_PRINT(("acd_size: %ld %ld\n",blksize,size));	return size;}