summaryrefslogtreecommitdiffstats
path: root/tools/dpdk-devbind.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/dpdk-devbind.py')
-rwxr-xr-xtools/dpdk-devbind.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/dpdk-devbind.py b/tools/dpdk-devbind.py
index e7cfcd02..47597dee 100755
--- a/tools/dpdk-devbind.py
+++ b/tools/dpdk-devbind.py
@@ -609,6 +609,13 @@ def do_arg_actions():
def main():
'''program main function'''
+ # check if lspci is installed, suppress any output
+ with open(os.devnull, 'w') as devnull:
+ ret = subprocess.call(['which', 'lspci'],
+ stdout=devnull, stderr=devnull)
+ if ret != 0:
+ print("'lspci' not found - please install 'pciutils'")
+ sys.exit(1)
parse_args()
check_modules()
get_nic_details()