All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: "Burakov, Anatoly" <anatoly.burakov@intel.com>, dev@dpdk.org
Cc: john.mcnamara@intel.com, stable@dpdk.org
Subject: Re: [dpdk-stable] [PATCH] devbind: check for lspci
Date: Wed, 7 Nov 2018 18:07:17 +0000	[thread overview]
Message-ID: <cb2db06e-97b2-5072-e862-6fd5ec0808c3@intel.com> (raw)
In-Reply-To: <b544afca-9f01-331c-d8a6-9b85e2c1a8bd@intel.com>

On 11/7/2018 4:30 PM, Burakov, Anatoly wrote:
> On 07-Nov-18 4:01 PM, Ferruh Yigit wrote:
>> On 11/7/2018 1:56 PM, Anatoly Burakov wrote:
>>> On some distributions (such as CentOS 7) lspci may not be installed
>>> by default, causing exceptions which are difficult to interpret.
>>>
>>> Fix devbind script to check if lspci is installed at script startup.
>>
>> I guess we need lspci for `--status`, bind/unbind can be done without `lspci`,
>> what about adding check only display path?
> 
> IMO it's not worth respinning over that minor detail, but if you feel 
> strongly about it - sure, i can do a v2 with this on display path only :)

No strong opinion, was just an idea, OK to go as it is if you prefer, not having
lspci installed but still want to use devbind may not be common usecase..

> 
>>
>>>
>>> Cc: stable@dpdk.org
>>>
>>> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
>>> ---
>>>   usertools/dpdk-devbind.py | 7 +++++++
>>>   1 file changed, 7 insertions(+)
>>>
>>> diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py
>>> index 7d564634c..74bf514c0 100755
>>> --- a/usertools/dpdk-devbind.py
>>> +++ b/usertools/dpdk-devbind.py
>>> @@ -655,6 +655,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 'lspci'")
>>> +            sys.exit(1)
>>>       parse_args()
>>>       check_modules()
>>>       clear_data()
>>>
>>
>>
> 
> 

  reply	other threads:[~2018-11-07 18:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-07 13:56 [PATCH] devbind: check for lspci Anatoly Burakov
2018-11-07 16:01 ` [dpdk-stable] " Ferruh Yigit
2018-11-07 16:30   ` Burakov, Anatoly
2018-11-07 18:07     ` Ferruh Yigit [this message]
2018-11-08 20:38     ` Rami Rosen
2018-11-09 12:03       ` Burakov, Anatoly
2018-11-10 11:03         ` Rami Rosen
2018-11-12  9:18           ` Burakov, Anatoly
2018-11-13 16:03   ` Burakov, Anatoly
2018-11-13 16:06 ` [PATCH v2] " Anatoly Burakov
2018-11-16 16:54   ` Rami Rosen
2018-11-18 23:05     ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cb2db06e-97b2-5072-e862-6fd5ec0808c3@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=john.mcnamara@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.