From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0EF29A056D; Thu, 12 Mar 2020 17:30:35 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 242882BE3; Thu, 12 Mar 2020 17:30:34 +0100 (CET) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by dpdk.org (Postfix) with ESMTP id 24D612BAA for ; Thu, 12 Mar 2020 17:30:33 +0100 (CET) Received: by mail-wr1-f43.google.com with SMTP id v11so8300172wrm.9 for ; Thu, 12 Mar 2020 09:30:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=lKJfxyaRiCTmnBrGw5qzgjFjrmbMVsuhVGR5wfN7ROk=; b=Y/lG/tzodHitVytGOMww1zewoHEQEdkEo4wDbUyMqMyHuXas+V6IikAUEEPdlr9laL SERw+xNe++VAnfamh1ipftFOoFoDfHALZwiXySw3dtrYJEVrXEOQvIVwa/WguQ7q37Mz PCxkkw9uvSNp19yKDdkHPuqb72WXbuWLsD8G9xtlU+67FgaviIzJO1lQZ+Ic50tDVOwb 6fVOz4+XLAOCwR1GMsSTe/bxilv4fEt6yqzlr4UP0mN/vNyLjYulBNADes2kbtU/EPxQ 0J5d8E6Ch/KNJ/yulSYCZbSR8IQlM8oKdMWnfwtTDvruVWa4ojRzMnOKvG6uABoFse3q ApWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=lKJfxyaRiCTmnBrGw5qzgjFjrmbMVsuhVGR5wfN7ROk=; b=q79GP1UlJ9Rpy3ZAfVHtUZtaPmrG2ngKE0jd4c/o6Vl7QQiJsoq/WvBOI0//bh+dxk IdI18/ok/jeGD9wPDzrvlmBZiUpvWVv+ik7Nd8BDUZx5WakF3NxLI+YUTbctlzFAvZme 69lT1m/iekHXAXRUyqWpuPnRmP10VJpKv7B9YIAxQLIFFw2xgQsrdy6zYMfvGF2w3Xax 2pP2m8zUXAXzM89o3D58WVk6Oyo3BgsBV1k58EdqRmBPBSXQp1XsXMh05u3FZ/uXb6/s 7iJK4elm5QVWSxFOjkDO8PL74JGN4szVk2kPq5vFKRCPSiGWUUdACIejPmcxig41TpRR sQkQ== X-Gm-Message-State: ANhLgQ3qtfKwK7CUbmsrd9/VjD+0E8w15QxPRKsX6rOx4IGkOefJevyR fIHyj4fPwLqbMO+W1PAQXCVWVJ+z X-Google-Smtp-Source: ADFU+vthUU+lkD6trqV1F/zD8sxIAs6Kx3D9yekI2Ysm6J1cE0mg/0QIHZJBODNtmqfbzwO6tn6rEA== X-Received: by 2002:adf:cd04:: with SMTP id w4mr12213619wrm.280.1584030632473; Thu, 12 Mar 2020 09:30:32 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id b5sm33970280wrj.1.2020.03.12.09.30.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Mar 2020 09:30:31 -0700 (PDT) From: luca.boccassi@gmail.com To: dev@dpdk.org Cc: christian.ehrhardt@canonical.com Date: Thu, 12 Mar 2020 16:30:27 +0000 Message-Id: <20200312163027.20760-1-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] pmdinfo: check for pci.ids in /usr/share/misc X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Luca Boccassi Debian and Ubuntu switched years ago from /usr/share/hwdata to /usr/share/misc, and the former is just a compat symlink now. We are starting to get bug reports to nudge us into changing. So check the new path first, and the old one as a fallback. Cc: stable@dpdk.org Signed-off-by: Luca Boccassi --- usertools/dpdk-pmdinfo.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usertools/dpdk-pmdinfo.py b/usertools/dpdk-pmdinfo.py index 9d5c6369a0..12f20735e0 100755 --- a/usertools/dpdk-pmdinfo.py +++ b/usertools/dpdk-pmdinfo.py @@ -561,7 +561,10 @@ def main(stream=None): pcifile_default = "./pci.ids" # For unknown OS's assume local file if platform.system() == 'Linux': - pcifile_default = "/usr/share/hwdata/pci.ids" + # hwdata is the legacy location, misc is supported going forward + pcifile_default = "/usr/share/misc/pci.ids" + if not os.path.exists(pcifile_default): + pcifile_default = "/usr/share/hwdata/pci.ids" elif platform.system() == 'FreeBSD': pcifile_default = "/usr/local/share/pciids/pci.ids" if not os.path.exists(pcifile_default): -- 2.20.1