Changeset 56824 in vbox for trunk/src/VBox/Main/src-server
- Timestamp:
- Jul 6, 2015 4:57:17 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/HostUSBDeviceImpl.cpp
r56822 r56824 5 5 6 6 /* 7 * Copyright (C) 2005-201 5Oracle Corporation7 * Copyright (C) 2005-2014 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 30 30 #include <VBox/err.h> 31 31 #include <iprt/cpp/utils.h> 32 #include "USBDevAliases.h"33 32 34 33 // constructor / destructor … … 168 167 169 168 aManufacturer = mUsb->pszManufacturer; 170 if (mUsb->pszManufacturer == NULL || mUsb->pszManufacturer[0] == 0) 171 { 172 USBNameAlias* alias = USBDevTableAdapter::findAlias(mUsb->idVendor, mUsb->idProduct); 173 if (alias != NULL) 174 { 175 aManufacturer = alias->vendor; 176 } 177 } 169 178 170 return S_OK; 179 171 } … … 185 177 186 178 aProduct = mUsb->pszProduct; 187 if (mUsb->pszProduct == NULL || mUsb->pszProduct[0]== 0) 188 { 189 USBNameAlias* alias = USBDevTableAdapter::findAlias(mUsb->idVendor, mUsb->idProduct); 190 if (alias != NULL) 191 { 192 aProduct = alias->product; 193 } 194 } 179 195 180 return S_OK; 196 181 } … … 343 328 name = Utf8StrFmt("%s", mUsb->pszProduct); 344 329 else 345 { 346 USBNameAlias* alias = USBDevTableAdapter::findAlias(mUsb->idVendor, mUsb->idProduct); 347 if (alias == NULL) 348 { 349 name = "<unknown>"; 350 LogRel(("USB: Unknown USB device detected ( idVendor: 0x%04x, idProduct: 0x%04x ). \ 351 Please, report the idVendor and idProduct to vbox.org.\n", mUsb->idVendor, mUsb->idProduct)); 352 } 353 else 354 { 355 name = Utf8StrFmt("%s %s", alias->vendor, alias->product); 356 } 357 } 330 name = "<unknown>"; 331 358 332 return name; 359 333 }
Note:
See TracChangeset
for help on using the changeset viewer.