am b6798ebb: am 5a1f9a3e: Merge "Remove the USB vendor id whitelist from fastboot."

* commit 'b6798ebbff08e2d2d0c1cc98a74b13976b4cdadc':
  Remove the USB vendor id whitelist from fastboot.
This commit is contained in:
Elliott Hughes 2015-08-11 00:44:01 +00:00 committed by Android Git Automerger
commit d0f0f88e3b

View file

@ -189,25 +189,16 @@ static void *load_file(const char *fn, unsigned *_sz)
return load_fd(fd, _sz); return load_fd(fd, _sz);
} }
int match_fastboot_with_serial(usb_ifc_info *info, const char *local_serial) int match_fastboot_with_serial(usb_ifc_info* info, const char* local_serial) {
{ // Require a matching vendor id if the user specified one with -i.
if(!(vendor_id && (info->dev_vendor == vendor_id)) && if (vendor_id != 0 && info->dev_vendor != vendor_id) {
(info->dev_vendor != 0x18d1) && // Google return -1;
(info->dev_vendor != 0x8087) && // Intel }
(info->dev_vendor != 0x0451) &&
(info->dev_vendor != 0x0502) && if (info->ifc_class != 0xff || info->ifc_subclass != 0x42 || info->ifc_protocol != 0x03) {
(info->dev_vendor != 0x0fce) && // Sony Ericsson return -1;
(info->dev_vendor != 0x05c6) && // Qualcomm }
(info->dev_vendor != 0x22b8) && // Motorola
(info->dev_vendor != 0x0955) && // Nvidia
(info->dev_vendor != 0x413c) && // DELL
(info->dev_vendor != 0x2314) && // INQ Mobile
(info->dev_vendor != 0x0b05) && // Asus
(info->dev_vendor != 0x0bb4)) // HTC
return -1;
if(info->ifc_class != 0xff) return -1;
if(info->ifc_subclass != 0x42) return -1;
if(info->ifc_protocol != 0x03) return -1;
// require matching serial number or device path if requested // require matching serial number or device path if requested
// at the command line with the -s option. // at the command line with the -s option.
if (local_serial && (strcmp(local_serial, info->serial_number) != 0 && if (local_serial && (strcmp(local_serial, info->serial_number) != 0 &&