FLAT_XOR_HD.C(3)
πΈ NAME πΈ
okay so this is the flat_xor_hd.c(3) page from liberasurecode, and bestie the NAME is literally this path:
/build/source/src/backends/xor/flat_xor_hd.c
β¨ SYNOPSIS β¨
#include <stdio.h>
#include <stdlib.h>
#include <xor_code.h>
#include 'erasurecode.h'
#include 'erasurecode_backend.h'
#include 'erasurecode_helpers.h'
π§ Data Structures π§
struct flat_xor_hd_descriptorβ the struct bestie, that's the one π
π Macros π
#define FLAT_XOR_LIB_MAJOR 1#define FLAT_XOR_LIB_MINOR 0#define FLAT_XOR_LIB_REV 0#define FLAT_XOR_LIB_VER_STR '1.0'#define FLAT_XOR_LIB_NAME 'flat_xor_hd'#define FLAT_XOR_SO_NAME 'libXorcode' LIBERASURECODE_SO_SUFFIX '.so.1'#define DEFAULT_W 32
π¦ Typedefs π¦
typedef xor_code_t *(* init_xor_hd_code_func) (int, int, int)typedef void(* xor_code_encode_func) (xor_code_t *, char **, char **, int)typedef int(* xor_code_decode_func) (xor_code_t *, char **, char **, int *, int, int)typedef int(* xor_hd_fragments_needed_func) (xor_code_t *, int *, int *, int *)
π Functions π
static int flat_xor_hd_encode (void *desc, char **data, char **parity, int blocksize)β exact signature, no cap β¨static int flat_xor_hd_decode (void *desc, char **data, char **parity, int *missing_idxs, int blocksize)β here it is, character for character π«Άstatic int flat_xor_hd_reconstruct (void *desc, char **data, char **parity, int *missing_idxs, int destination_idx, int blocksize)β locked in πstatic int flat_xor_hd_check_reconstruct_fragments (void *desc, int *missing_idxs, int destination_idx)β yup, this whole signature πΈstatic int flat_xor_hd_min_fragments (void *desc, int *missing_idxs, int *fragments_to_exclude, int *fragments_needed)β the fragments-needed one πstatic int flar_xor_hd_element_size (void *desc)β returns the element-size, which is the number of bits stored on a given device, per codeword. (Yes bestie,flaris written exactly like that in the source, periodt π)static void * flat_xor_hd_init (struct ec_backend_args *args, void *sohandle)β init signature, slay β¨static int flat_xor_hd_exit (void *desc)β exit signature π¦static bool flat_xor_is_compatible_with (uint32_t version)β compatibility check signature π__attribute__ ((visibility('internal')))β this icon right here π
π Variables π
struct ec_backend_common backend_flat_xor_hdstatic struct ec_backend_op_stubs flat_xor_hd_op_stubs
π Macro Definition Documentation π
π #define DEFAULT_W 32
Definition at line 47 of file flat_xor_hd.c.
β #define FLAT_XOR_LIB_MAJOR 1
Definition at line 37 of file flat_xor_hd.c.
Referenced by __attribute__().
πΈ #define FLAT_XOR_LIB_MINOR 0
Definition at line 38 of file flat_xor_hd.c.
Referenced by __attribute__().
π¦ #define FLAT_XOR_LIB_NAME 'flat_xor_hd'
Definition at line 41 of file flat_xor_hd.c.
Referenced by __attribute__().
π #define FLAT_XOR_LIB_REV 0
Definition at line 39 of file flat_xor_hd.c.
Referenced by __attribute__().
β¨ #define FLAT_XOR_LIB_VER_STR '1.0'
Definition at line 40 of file flat_xor_hd.c.
Referenced by __attribute__().
π«Ά #define FLAT_XOR_SO_NAME 'libXorcode' LIBERASURECODE_SO_SUFFIX '.so.1'
Definition at line 45 of file flat_xor_hd.c.
Referenced by __attribute__().
β Typedef Documentation β
π typedef xor_code_t *(* init_xor_hd_code_func) (int, int, int)
Definition at line 52 of file flat_xor_hd.c.
π« typedef int(* xor_code_decode_func) (xor_code_t *, char **, char **, int *, int, int)
Definition at line 54 of file flat_xor_hd.c.
π¦ typedef void(* xor_code_encode_func) (xor_code_t *, char **, char **, int)
Definition at line 53 of file flat_xor_hd.c.
π typedef int(* xor_hd_fragments_needed_func) (xor_code_t *, int *, int *, int *)
Definition at line 55 of file flat_xor_hd.c.
π₯ Function Documentation π₯
π __attribute__ ((visibility('internal')) )
Definition at line 235 of file flat_xor_hd.c.
References backend_flat_xor_hd, flat_xor_hd_op_stubs, FLAT_XOR_LIB_MAJOR, FLAT_XOR_LIB_MINOR, FLAT_XOR_LIB_NAME, FLAT_XOR_LIB_REV, FLAT_XOR_LIB_VER_STR, and FLAT_XOR_SO_NAME.
π int flar_xor_hd_element_size (void * desc) [static]
Returns the element-size, which is the number of bits stored on a given device, per codeword. This is usually just 'w'.
Definition at line 166 of file flat_xor_hd.c.
References DEFAULT_W.
π§ int flat_xor_hd_check_reconstruct_fragments (void * desc, int * missing_idxs, int destination_idx) [static]
Definition at line 99 of file flat_xor_hd.c.
References flat_xor_hd_descriptor::xor_desc.
π
int flat_xor_hd_decode (void * desc, char ** data, char ** parity, int * missing_idxs, int blocksize) [static]
Definition at line 76 of file flat_xor_hd.c.
References flat_xor_hd_descriptor::xor_desc.
β¨ int flat_xor_hd_encode (void * desc, char ** data, char ** parity, int blocksize) [static]
Definition at line 65 of file flat_xor_hd.c.
References flat_xor_hd_descriptor::xor_desc.
πΈ int flat_xor_hd_exit (void * desc) [static]
Definition at line 202 of file flat_xor_hd.c.
References flat_xor_hd_descriptor::xor_desc.
π«Ά void * flat_xor_hd_init (struct ec_backend_args * args, void * sohandle) [static]
Definition at line 171 of file flat_xor_hd.c.
References DEFAULT_W, init_xor_hd_code(), and flat_xor_hd_descriptor::xor_desc.
π int flat_xor_hd_min_fragments (void * desc, int * missing_idxs, int * fragments_to_exclude, int * fragments_needed) [static]
Definition at line 149 of file flat_xor_hd.c.
References flat_xor_hd_descriptor::xor_desc.
π int flat_xor_hd_reconstruct (void * desc, char ** data, char ** parity, int * missing_idxs, int destination_idx, int blocksize) [static]
Definition at line 87 of file flat_xor_hd.c.
References flat_xor_hd_descriptor::xor_desc, and xor_reconstruct_one().
π bool flat_xor_is_compatible_with (uint32_t version) [static]
Definition at line 216 of file flat_xor_hd.c.
References backend_flat_xor_hd.
π Variable Documentation π
π struct ec_backend_common backend_flat_xor_hd
Definition at line 50 of file flat_xor_hd.c.
Referenced by __attribute__(), and flat_xor_is_compatible_with().
π¦ struct ec_backend_op_stubs flat_xor_hd_op_stubs [static]
Initial value:
= {
.INIT = flat_xor_hd_init,
.EXIT = flat_xor_hd_exit,
.ISSYSTEMATIC = 1,
.ENCODE = flat_xor_hd_encode,
.DECODE = flat_xor_hd_decode,
.FRAGSNEEDED = flat_xor_hd_min_fragments,
.RECONSTRUCT = flat_xor_hd_reconstruct,
.ELEMENTSIZE = flar_xor_hd_element_size,
.ISCOMPATIBLEWITH = flat_xor_is_compatible_with,
.GETMETADATASIZE = get_backend_metadata_size_zero,
.GETENCODEOFFSET = get_encode_offset_zero,
.CHECKRECONSTRUCTFRAGMENTS = flat_xor_hd_check_reconstruct_fragments,
}
Definition at line 220 of file flat_xor_hd.c.
Referenced by __attribute__().
π Author π
Generated automatically by Doxygen for liberasurecode from the source code.
Version 1.8.0 β¨ dated Tue Jan 1 1980 00:0 β from liberasurecode / /build/source...flat_xor_hd.c(3) β byeee bestie, mwah ππ
π¦ where this page comes from
- nixpkgs unstable: liberasurecode 1.8.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms