diff options
| author | Daniel T. Lee <danieltimlee@gmail.com> | 2019-10-05 17:25:07 +0900 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-12-31 16:43:45 +0100 |
| commit | fa2f23e6a883b20673da93a2368aca71490badb9 (patch) | |
| tree | e89041536ca4ef89d90e19ef17df2fc9265fff3d /include/trace | |
| parent | f2a96101c5d2e7ea439517774fad1e2f6109333b (diff) | |
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>
Diffstat (limited to 'include/trace')
0 files changed, 0 insertions, 0 deletions
