summaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-inline.h
diff options
context:
space:
mode:
authorCong Wang <amwang@redhat.com>2013-01-27 21:14:08 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-02-14 10:48:17 -0800
commitbadaed3effae5565307a25a3692ebde36e25fa33 (patch)
tree08849f197aec7f220ebf081185e622608d58ba4f /lib/mpi/mpi-inline.h
parent70b40e0ec5a61b7c073690c2a2fc1da13b520254 (diff)
pktgen: correctly handle failures when adding a device
[ Upstream commit 604dfd6efc9b79bce432f2394791708d8e8f6efc ] The return value of pktgen_add_device() is not checked, so even if we fail to add some device, for example, non-exist one, we still see "OK:...". This patch fixes it. After this patch, I got: # echo "add_device non-exist" > /proc/net/pktgen/kpktgend_0 -bash: echo: write error: No such device # cat /proc/net/pktgen/kpktgend_0 Running: Stopped: Result: ERROR: can not add device non-exist # echo "add_device eth0" > /proc/net/pktgen/kpktgend_0 # cat /proc/net/pktgen/kpktgend_0 Running: Stopped: eth0 Result: OK: add_device=eth0 (Candidate for -stable) Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Cong Wang <amwang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/mpi/mpi-inline.h')
0 files changed, 0 insertions, 0 deletions