samples/bpf: Check the result of system()
authorTaeung Song <treeze.taeung@gmail.com>
Wed, 4 Jul 2018 13:36:37 +0000 (22:36 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Aug 2018 11:06:59 +0000 (13:06 +0200)
commit2c8f70b90aaa024d2d07c15a2ec1c11af97194a1
treefbde3ab3620db99756b3394cc675be32aaf22d08
parent94ffaf9ecd61372460b16da72d22c40928988248
samples/bpf: Check the result of system()

[ Upstream commit 492b7e894587c151be681f86d4d1d086375f7b45 ]

To avoid the below build warning message,
use new generate_load() checking the return value.

  ignoring return value of â€˜system’, declared with attribute warn_unused_result

And it also refactors the duplicate code of both
test_perf_event_all_cpu() and test_perf_event_task()

Cc: Teng Qin <qinteng@fb.com>
Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
samples/bpf/trace_event_user.c