Lines Matching refs:size

346 bpf_loader_strerror(int err, char *buf, size_t size)  in bpf_loader_strerror()  argument
351 if (!buf || !size) in bpf_loader_strerror()
357 return libbpf_strerror(err, buf, size); in bpf_loader_strerror()
361 snprintf(buf, size, "%s", msg); in bpf_loader_strerror()
362 buf[size - 1] = '\0'; in bpf_loader_strerror()
367 snprintf(buf, size, "Unknown bpf loader error %d", err); in bpf_loader_strerror()
369 snprintf(buf, size, "%s", in bpf_loader_strerror()
372 buf[size - 1] = '\0'; in bpf_loader_strerror()
376 #define bpf__strerror_head(err, buf, size) \ argument
378 if (!size)\
386 scnprintf(buf, size, "%s", emsg);\
391 scnprintf(buf, size, fmt);\
395 #define bpf__strerror_end(buf, size)\ argument
397 buf[size - 1] = '\0';
400 int err, char *buf, size_t size) in bpf__strerror_prepare_load() argument
405 n = snprintf(buf, size, "Failed to load %s%s: ", in bpf__strerror_prepare_load()
407 if (n >= size) { in bpf__strerror_prepare_load()
408 buf[size - 1] = '\0'; in bpf__strerror_prepare_load()
412 size -= n; in bpf__strerror_prepare_load()
414 ret = bpf_loader_strerror(err, buf, size); in bpf__strerror_prepare_load()
415 buf[size - 1] = '\0'; in bpf__strerror_prepare_load()
420 int err, char *buf, size_t size) in bpf__strerror_probe() argument
422 bpf__strerror_head(err, buf, size); in bpf__strerror_probe()
427 bpf__strerror_end(buf, size); in bpf__strerror_probe()
432 int err, char *buf, size_t size) in bpf__strerror_load() argument
434 bpf__strerror_head(err, buf, size); in bpf__strerror_load()
440 scnprintf(buf, size, "Unable to fetch kernel version"); in bpf__strerror_load()
445 scnprintf(buf, size, in bpf__strerror_load()
452 scnprintf(buf, size, "Failed to load program for unknown reason"); in bpf__strerror_load()
455 bpf__strerror_end(buf, size); in bpf__strerror_load()