Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/mmc/mmc_xpt.c
Show First 20 Lines • Show All 359 Lines • ▼ Show 20 Lines | case CDAI_TYPE_SERIAL_NUM: | ||||
if (device->serial_num_len == 0) | if (device->serial_num_len == 0) | ||||
break; | break; | ||||
amt = MIN(cdai->provsiz, cdai->bufsiz); | amt = MIN(cdai->provsiz, cdai->bufsiz); | ||||
memcpy(cdai->buf, device->serial_num, amt); | memcpy(cdai->buf, device->serial_num, amt); | ||||
break; | break; | ||||
case CDAI_TYPE_PHYS_PATH: /* pass(4) wants this */ | case CDAI_TYPE_PHYS_PATH: /* pass(4) wants this */ | ||||
cdai->provsiz = 0; | cdai->provsiz = 0; | ||||
break; | break; | ||||
case CDAI_TYPE_MMC_PARAMS: | |||||
cdai->provsiz = device->mmc_ident_data; | |||||
if (device->mmc_ident_data == NULL) | |||||
break; | |||||
amt = MIN(cdai->provsiz, cdai->bufsiz); | |||||
memcpy(cdai->buff, device->mmc_ident_data, amt); | |||||
imp: I assume the ioctl takes care of setting up the kernel buffer for this, then copying it out to… | |||||
scottlAuthorUnsubmitted Not Done Inline ActionsI believe it's handled automatically in cam_periph_mapmem() scottl: I believe it's handled automatically in cam_periph_mapmem() | |||||
break; | |||||
default: | default: | ||||
panic("Unknown buftype"); | panic("Unknown buftype"); | ||||
return; | return; | ||||
} | } | ||||
start_ccb->ccb_h.status = CAM_REQ_CMP; | start_ccb->ccb_h.status = CAM_REQ_CMP; | ||||
} | } | ||||
static void | static void | ||||
▲ Show 20 Lines • Show All 698 Lines • Show Last 20 Lines |
I assume the ioctl takes care of setting up the kernel buffer for this, then copying it out to user space?