---
name: "decode_rs8"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/decode_rs8"
---

# decode\_rs8(9)

Decode codeword (8bit data width)

## NAME

decode\_rs8 - Decode codeword (8bit data width)

## SYNOPSIS

**int decode\_rs8(struct rs\_control \*** *rs***, uint8\_t \*** *data***, uint16\_t \*** *par***, int** *len***, uint16\_t \*** *s***, int** *no\_eras***, int \*** *eras\_pos***, uint16\_t** *invmsk***, uint16\_t \*** *corr***);**

## ARGUMENTS

*rs*

the rs control structure

*data*

data field of a given type

*par*

received parity data field

*len*

data length

*s*

syndrome data field (if NULL, syndrome is calculated)

*no\_eras*

number of erasures

*eras\_pos*

position of erasures, can be NULL

*invmsk*

invert data mask (will be xored on data, not on parity!)

*corr*

buffer to store correction bitmask on eras\_pos

## DESCRIPTION

The syndrome and parity uses a uint16\_t data type to enable symbol size \> 8. The calling code must take care of decoding of the syndrome result and the received parity before calling this code. Returns the number of corrected bits or -EBADMSG for uncorrectable errors.

## AUTHOR

**Thomas Gleixner** \<tglx@linutronix.de\>

Author.

## COPYRIGHT
