lib/sg_lib.c
static void
sg_get_sense_sat_pt_fixed_str(const unsigned char * sp, int slen, int blen,
                              char * b)
{
    int n = 0;

    if ((blen < 1) || (slen < 12))
        return;
    if (SPC_SK_RECOVERED_ERROR != (0xf & sp[2]))
        n += my_snprintf(b + n, blen - n, "  >> expected Sense key: "
                         "Recovered Error ??\n");
    n += my_snprintf(b + n, blen - n, "  error=0x%x, status=0x%x, "
                     "device=0x%x, sector_count(7:0)=0x%x%c\n", sp[3], sp[4],
                     sp[5], sp[6], ((0x40 & sp[8]) ? '+' : ' '));
    n += my_snprintf(b + n, blen - n, "  extend=%d, log_index=0x%x, "
                     "lba_high,mid,low(7:0)=0x%x,0x%x,0x%x%c\n",
                     (!!(0x80 & sp[8])), (0xf & sp[8]), sp[9], sp[10], sp[11],
                     ((0x20 & sp[8]) ? '+' : ' '));
}
/* Decode SAT ATA PASS-THROUGH fixed format sense */
Decode SAT ATA PASS-THROUGH fixed format sense
Decode SAT ATA PASS - THROUGH fixed format sense
static void
sg_get_sense_sat_pt_fixed_str(const unsigned char * sp, int slen, int blen,
                              char * b)
{
    int n = 0;
    if ((blen < 1) || (slen < 12))
        return;
    if (SPC_SK_RECOVERED_ERROR != (0xf & sp[2]))
        n += my_snprintf(b + n, blen - n, "  >> expected Sense key: "
                         "Recovered Error ??\n");
    n += my_snprintf(b + n, blen - n, "  error=0x%x, status=0x%x, "
                     "device=0x%x, sector_count(7:0)=0x%x%c\n", sp[3], sp[4],
                     sp[5], sp[6], ((0x40 & sp[8]) ? '+' : ' '));
    n += my_snprintf(b + n, blen - n, "  extend=%d, log_index=0x%x, "
                     "lba_high,mid,low(7:0)=0x%x,0x%x,0x%x%c\n",
                     (!!(0x80 & sp[8])), (0xf & sp[8]), sp[9], sp[10], sp[11],
                     ((0x20 & sp[8]) ? '+' : ' '));
}
static void sg_get_sense_sat_pt_fixed_str ( const unsigned char * sp , int slen , int blen , char * b ) { int n = 0 ; if ( ( blen < 1 ) || ( slen < 12 ) ) return ; if ( SPC_SK_RECOVERED_ERROR != ( 0xf & sp [ 2 ] ) ) n += my_snprintf ( b + n , blen - n , " " " \n " ) ; n += my_snprintf ( b + n , blen - n , " " " \n " , sp [ 3 ] , sp [ 4 ] , sp [ 5 ] , sp [ 6 ] , ( ( 0x40 & sp [ 8 ] ) ? ' ' : ' ' ) ) ; n += my_snprintf ( b + n , blen - n , " " " \n " , ( ! ! ( 0x80 & sp [ 8 ] ) ) , ( 0xf & sp [ 8 ] ) , sp [ 9 ] , sp [ 10 ] , sp [ 11 ] , ( ( 0x20 & sp [ 8 ] ) ? ' ' : ' ' ) ) ; }
Decode SAT ATA PASS-THROUGH fixed format sense
Decode SAT ATA PASS - THROUGH fixed format sense