diff options
author | Tushar Gohad <tushar.gohad@intel.com> | 2014-07-16 13:27:13 -0700 |
---|---|---|
committer | Tushar Gohad <tushar.gohad@intel.com> | 2014-07-16 13:34:53 -0700 |
commit | 1a795da4a1f58e1e946d1bdd3b0693fc4906e87f (patch) | |
tree | 9a06c9c131e60be478a7aec5c911886351f02381 /test | |
parent | 05e65c3f96d54f7ddbbd0318ad6479011b6f02c6 (diff) | |
download | liberasurecode-1a795da4a1f58e1e946d1bdd3b0693fc4906e87f.tar.gz |
Store args natively in the backend_args (not as a pointer)
Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/liberasurecode_test.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/liberasurecode_test.c b/test/liberasurecode_test.c index 197e927..bcb3ca0 100644 --- a/test/liberasurecode_test.c +++ b/test/liberasurecode_test.c @@ -4,8 +4,16 @@ int main() { int blocksize = 4096; char **data = NULL, **parity = NULL; - int desc = liberasurecode_instance_create("flat_xor_hd", 10, 4, 0, NULL); - liberasurecode_encode(desc, data, parity, blocksize); + + struct ec_args args = { + .k = 10, + .m = 4, + .priv_args1.flat_xor_hd_args.hd = 3, + }; + + int desc = liberasurecode_instance_create("flat_xor_hd", &args); + + // liberasurecode_encode(desc, (const char *) *data, 0, data, parity); liberasurecode_instance_destroy(desc); return 0; } |