android_kernel_samsung_a7y1.../samples
Daniel T. Lee 4c34d54f5b samples: pktgen: fix proc_cmd command result check logic
[ Upstream commit 3cad8f911575191fb3b81d8ed0e061e30f922223 ]

Currently, proc_cmd is used to dispatch command to 'pg_ctrl', 'pg_thread',
'pg_set'. proc_cmd is designed to check command result with grep the
"Result:", but this might fail since this string is only shown in
'pg_thread' and 'pg_set'.

This commit fixes this logic by grep-ing the "Result:" string only when
the command is not for 'pg_ctrl'.

For clarity of an execution flow, 'errexit' flag has been set.

To cleanup pktgen on exit, trap has been added for EXIT signal.

Signed-off-by: Daniel T. Lee <danieltimlee@gmail.com>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-07 13:20:29 +02:00
..
bpf samples, bpf: fix to change the buffer size for read() 2020-04-06 19:26:03 +02:00
configfs A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hidraw A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hw_breakpoint A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
kdb A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
kfifo A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
kobject A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
kprobes A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
livepatch A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mic/mpssd A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pktgen samples: pktgen: fix proc_cmd command result check logic 2020-04-07 13:20:29 +02:00
rpmsg A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
seccomp A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace_events A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
uhid A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30