Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/mmc/mmc_da.c
Show First 20 Lines • Show All 1,302 Lines • ▼ Show 20 Lines | CAM_DEBUG(periph->path, CAM_DEBUG_PERIPH, | ||||
softc->mediasize, | softc->mediasize, | ||||
softc->sector_count)); | softc->sector_count)); | ||||
mmc_format_card_id_string(softc, mmcp); | mmc_format_card_id_string(softc, mmcp); | ||||
/* Update info for CAM */ | /* Update info for CAM */ | ||||
device->serial_num_len = strlen(softc->card_sn_string); | device->serial_num_len = strlen(softc->card_sn_string); | ||||
device->serial_num = (u_int8_t *)malloc((device->serial_num_len + 1), | device->serial_num = (u_int8_t *)malloc((device->serial_num_len + 1), | ||||
M_CAMXPT, M_NOWAIT); | M_CAMXPT, M_NOWAIT); | ||||
strlcpy(device->serial_num, softc->card_sn_string, device->serial_num_len); | strlcpy(device->serial_num, softc->card_sn_string, device->serial_num_len + 1); | ||||
imp: This is unrelated.... why's it needed?
| |||||
Done Inline Actions
Just to have the complete sn in gpart disk-id. hlh_restart.be: > This is unrelated.... why's it needed?
>
Just to have the complete sn in gpart disk-id. | |||||
device->device_id_len = strlen(softc->card_id_string); | device->device_id_len = strlen(softc->card_id_string); | ||||
device->device_id = (u_int8_t *)malloc((device->device_id_len + 1), | device->device_id = (u_int8_t *)malloc((device->device_id_len + 1), | ||||
M_CAMXPT, M_NOWAIT); | M_CAMXPT, M_NOWAIT); | ||||
strlcpy(device->device_id, softc->card_id_string, device->device_id_len); | strlcpy(device->device_id, softc->card_id_string, device->device_id_len + 1); | ||||
strlcpy(mmcp->model, softc->card_id_string, sizeof(mmcp->model)); | strlcpy(mmcp->model, softc->card_id_string, sizeof(mmcp->model)); | ||||
/* Set the clock frequency that the card can handle */ | /* Set the clock frequency that the card can handle */ | ||||
cts = &start_ccb->cts.proto_specific.mmc; | cts = &start_ccb->cts.proto_specific.mmc; | ||||
/* First, get the host's max freq */ | /* First, get the host's max freq */ | ||||
start_ccb->ccb_h.func_code = XPT_GET_TRAN_SETTINGS; | start_ccb->ccb_h.func_code = XPT_GET_TRAN_SETTINGS; | ||||
▲ Show 20 Lines • Show All 697 Lines • Show Last 20 Lines |
This is unrelated.... why's it needed?