Lines Matching defs:serial
102 char *serial, char *serial_short, int max_len);
448 * The caller checks that serial is long enough to include the vendor +
452 struct scsi_id_device *dev_scsi, char *serial)
456 strncpy(serial, dev_scsi->vendor, VENDOR_LENGTH);
457 strncat(serial, dev_scsi->model, MODEL_LENGTH);
458 ind = strlen(serial);
474 * serial number.
480 *id_search, char *serial, char *serial_short,
543 serial[0] = hex_str[id_search->id_type];
552 if (prepend_vendor_model(udev, dev_scsi, &serial[1]) < 0)
556 s = j = strlen(serial);
562 serial[j++] = page_83[i++];
569 serial[j++] = hex_str[(page_83[i] & 0xf0) >> 4];
570 serial[j++] = hex_str[page_83[i] & 0x0f];
575 strcpy(serial_short, &serial[s]);
578 strncpy(wwn, &serial[s], 16);
580 strncpy(wwn_vendor_extension, &serial[s + 16], 16);
591 *id_search, char *serial, char *serial_short, int max_len)
595 serial[0] = hex_str[id_search->id_type];
596 /* serial has been memset to zero before */
597 j = strlen(serial); /* j = 1; */
600 serial[j++] = hex_str[(page_83[4+i] & 0xf0) >> 4];
601 serial[j++] = hex_str[ page_83[4+i] & 0x0f];
603 serial[max_len-1] = 0;
604 strncpy(serial_short, serial, max_len-1);
612 char *serial, char *serial_short, int len,
620 /* also pick up the page 80 serial number */
666 serial, serial_short, len);
683 serial, serial_short, len,
704 char *serial, char *serial_short, int len)
744 serial[0] = hex_str[id_search_list[0].id_type];
749 j = strlen(serial);
756 serial[j++] = hex_str[(page_83[i] & 0xf0) >> 4];
757 serial[j++] = hex_str[page_83[i] & 0x0f];
763 /* Get unit serial number VPD page */
766 char *serial, char *serial_short, int max_len)
795 if (serial != NULL) {
796 serial[0] = 'S';
797 ser_ind = prepend_vendor_model(udev, dev_scsi, &serial[1]);
802 serial[ser_ind] = buf[i];
862 memzero(dev_scsi->serial, len);
878 if (do_scsi_page80_inquiry(udev, dev_scsi, fd, dev_scsi->serial, dev_scsi->serial_short, len)) {
886 if (do_scsi_page83_inquiry(udev, dev_scsi, fd, dev_scsi->serial, dev_scsi->serial_short, len, dev_scsi->unit_serial_number, dev_scsi->wwn, dev_scsi->wwn_vendor_extension, dev_scsi->tgpt_group)) {
894 retval = do_scsi_page83_prespc3_inquiry(udev, dev_scsi, fd, dev_scsi->serial, dev_scsi->serial_short, len);
902 if (do_scsi_page83_inquiry(udev, dev_scsi, fd, dev_scsi->serial, dev_scsi->serial_short, len, dev_scsi->unit_serial_number, dev_scsi->wwn, dev_scsi->wwn_vendor_extension, dev_scsi->tgpt_group)) {
941 dev_scsi->serial, dev_scsi->serial_short, len, dev_scsi->unit_serial_number, dev_scsi->wwn, dev_scsi->wwn_vendor_extension, dev_scsi->tgpt_group)) {
952 dev_scsi->serial, dev_scsi->serial_short, len)) {