openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/systemd/1_242+AUTOINC+db2e367bfc-r0/git/src/udev/scsi_id/scsi_serial.c
static int
    check_fill_0x83_prespc3(struct scsi_id_device* dev_scsi,
                            unsigned char* page_83,
                            const struct scsi_id_search_values* id_search,
                            char* serial, char* serial_short, int max_len)
{
    int i, j;

    serial[0] = hex_str[SCSI_ID_NAA];
    /* serial has been memset to zero before */
    j = strlen(serial); /* j = 1; */

    for (i = 0; (i < page_83[3]) && (j < max_len - 3); ++i)
    {
        serial[j++] = hex_str[(page_83[4 + i] & 0xf0) >> 4];
        serial[j++] = hex_str[page_83[4 + i] & 0x0f];
    }
    serial[max_len - 1] = 0;
    strncpy(serial_short, serial, max_len - 1);
    return 0;
}
/* Extract the raw binary from VPD 0x83 pre-SPC devices */
Extract the raw binary from VPD 0x83 pre-SPC devices
Extract the raw binary from VPD 0x83 pre - SPC devices
static int
    check_fill_0x83_prespc3(struct scsi_id_device* dev_scsi,
                            unsigned char* page_83,
                            const struct scsi_id_search_values* id_search,
                            char* serial, char* serial_short, int max_len)
{
    int i, j;
    serial[0] = hex_str[SCSI_ID_NAA];
    j = strlen(serial); 
    for (i = 0; (i < page_83[3]) && (j < max_len - 3); ++i)
    {
        serial[j++] = hex_str[(page_83[4 + i] & 0xf0) >> 4];
        serial[j++] = hex_str[page_83[4 + i] & 0x0f];
    }
    serial[max_len - 1] = 0;
    strncpy(serial_short, serial, max_len - 1);
    return 0;
}
static int check_fill_0x83_prespc3 ( struct scsi_id_device * dev_scsi , unsigned char * page_83 , const struct scsi_id_search_values * id_search , char * serial , char * serial_short , int max_len ) { int i , j ; serial [ 0 ] = hex_str [ SCSI_ID_NAA ] ; j = strlen ( serial ) ; for ( i = 0 ; ( i < page_83 [ 3 ] ) && ( j < max_len - 3 ) ; ++ i ) { serial [ j ++ ] = hex_str [ ( page_83 [ 4 + i ] & 0xf0 ) >> 4 ] ; serial [ j ++ ] = hex_str [ page_83 [ 4 + i ] & 0x0f ] ; } serial [ max_len - 1 ] = 0 ; strncpy ( serial_short , serial , max_len - 1 ) ; return 0 ; }
Extract the raw binary from VPD 0x83 pre-SPC devices
Extract the raw binary from VPD 0x83 pre - SPC devices
/* serial has been memset to zero before */ /* j = 1; */