* Copyright(c) 2017 Intel Corporation
*/
-#ifdef RTE_EXEC_ENV_BSDAPP
+#ifdef RTE_EXEC_ENV_FREEBSD
#define _WITH_GETLINE
#endif
#include <stdio.h>
vector->mask |= TEST_BBDEV_VF_NUM_MAPS;
turbo_dec->num_maps = (uint8_t) strtoul(token, &err, 0);
ret = ((err == NULL) || (*err != '\0')) ? -1 : 0;
+ } else if (!strcmp(key_token, "r")) {
+ vector->mask |= TEST_BBDEV_VF_R;
+ turbo_dec->tb_params.r = (uint8_t) strtoul(token, &err, 0);
+ ret = ((err == NULL) || (*err != '\0')) ? -1 : 0;
} else if (!strcmp(key_token, "code_block_mode")) {
vector->mask |= TEST_BBDEV_VF_CODE_BLOCK_MODE;
turbo_dec->code_block_mode = (uint8_t) strtoul(token, &err, 0);
if (!(mask & TEST_BBDEV_VF_CAB))
printf(
"WARNING: cab was not specified in vector file and will be set to 0\n");
+ if (!(mask & TEST_BBDEV_VF_R))
+ printf(
+ "WARNING: r was not specified in vector file and will be set to 0\n");
} else {
if (!(mask & TEST_BBDEV_VF_E))
printf(
goto exit;
}
- memset(entry, 0, strlen(line) + 1);
- strncpy(entry, line, strlen(line));
+ strcpy(entry, line);
/* check if entry ends with , or = */
if (entry[strlen(entry) - 1] == ','
}
entry = entry_extended;
- strncat(entry, line, strlen(line));
+ /* entry has been allocated accordingly */
+ strcpy(&entry[strlen(entry)], line);
if (entry[strlen(entry) - 1] != ',')
break;