MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rte_tel_data_string

Function rte_tel_data_string

dpdk/lib/telemetry/telemetry_data.c:41–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41int
42rte_tel_data_string(struct rte_tel_data *d, const char *str)
43{
44 d->type = TEL_STRING;
45 d->data_len = strlcpy(d->data.str, str, sizeof(d->data.str));
46 if (d->data_len >= RTE_TEL_MAX_SINGLE_STRING_LEN) {
47 d->data_len = RTE_TEL_MAX_SINGLE_STRING_LEN - 1;
48 return E2BIG; /* not necessarily and error, just truncation */
49 }
50 return 0;
51}
52
53int
54rte_tel_data_add_array_string(struct rte_tel_data *d, const char *str)

Callers 7

command_helpFunction · 0.85
handle_dev_dumpFunction · 0.85
dmadev_handle_dev_dumpFunction · 0.85
handle_dev_dumpFunction · 0.85
test_simple_stringFunction · 0.85

Calls 1

strlcpyFunction · 0.50

Tested by 2

test_simple_stringFunction · 0.68