Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(935)

Side by Side Diff: tools/telemetry/third_party/pyserial/linux-product_info.patch

Issue 325663002: [PowerProfiler] pySerial module serial.tools.list_ports for linux should include the product inform… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Patch for landing! Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 Index: serial/tools/list_ports_linux.py
2 ===================================================================
3 --- serial/tools/list_ports_linux.py (revision 494)
4 +++ serial/tools/list_ports_linux.py (working copy)
5 @@ -110,6 +110,14 @@
6 sys_dev_path = '/sys/class/tty/%s/device/interface' % (base,)
7 if os.path.exists(sys_dev_path):
8 return read_line(sys_dev_path)
9 +
10 + # USB Product Information
11 + sys_dev_path = '/sys/class/tty/%s/device' % (base,)
12 + if os.path.exists(sys_dev_path):
13 + product_name_file = os.path.dirname(os.path.realpath(sys_dev_path)) + " /product"
14 + if os.path.exists(product_name_file):
15 + return read_line(product_name_file)
16 +
17 return base
18
19 def hwinfo(device):
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698