lib/sg_lib.c
char *
sg_get_sense_key_str(int sense_key, int buff_len, char * buff)
{
    if (1 == buff_len) {
        buff[0] = '\0';
        return buff;
    }
    if ((sense_key >= 0) && (sense_key < 16))
         my_snprintf(buff, buff_len, "%s", sg_lib_sense_key_desc[sense_key]);
    else
         my_snprintf(buff, buff_len, "invalid value: 0x%x", sense_key);
    return buff;
}
/* Yield string associated with sense_key value. Returns 'buff'. */
Yield string associated with sense_key value. Returns 'buff'.
Yield string associated with sense_key value . Returns ' buff ' .
char *
sg_get_sense_key_str(int sense_key, int buff_len, char * buff)
{
    if (1 == buff_len) {
        buff[0] = '\0';
        return buff;
    }
    if ((sense_key >= 0) && (sense_key < 16))
         my_snprintf(buff, buff_len, "%s", sg_lib_sense_key_desc[sense_key]);
    else
         my_snprintf(buff, buff_len, "invalid value: 0x%x", sense_key);
    return buff;
}
char * sg_get_sense_key_str ( int sense_key , int buff_len , char * buff ) { if ( 1 == buff_len ) { buff [ 0 ] = ' \0 ' ; return buff ; } if ( ( sense_key >= 0 ) && ( sense_key < 16 ) ) my_snprintf ( buff , buff_len , " " , sg_lib_sense_key_desc [ sense_key ] ) ; else my_snprintf ( buff , buff_len , " " , sense_key ) ; return buff ; }
Yield string associated with sense_key value.
Yield string associated with sense_key value .