Print this page
3217 cfgadm should spell "adaptors" correctly
Reviewed by: Alexander Eremin <alexander.r.eremin@gmail.com>
Reviewed by: David Hoeppner <0xffea@gmail.com>
Reviewed by: Gary Mills <gary_mills@fastmail.fm>
Reviewed by: Eric Schrock <Eric.Schrock@delphix.com>


 313     log.debug("Detected %d target mode adapters", tgthbaList->numPorts);
 314     for (int i = 0; i < tgthbaList->numPorts; i++) {
 315         try {
 316             std::string hbapath = FCT_ADAPTER_NAME_PREFIX.c_str();
 317             hbapath += ".";
 318             // move the row with two dimentional uint8 array for WWN
 319             uint64_t tmp = ntohll(*((uint64_t *)&tgthbaList->port_wwn[i][0]));
 320             sprintf(wwnStr, "%llx", tmp);
 321             hbapath += wwnStr;
 322 
 323             HBA *hba = new TgtFCHBA(hbapath);
 324             list.insert(list.begin(), hba);
 325         } catch (...) {
 326             log.debug(
 327                 "Ignoring partial failure while loading an HBA");
 328         }
 329     }
 330     if (tgthbaList->numPorts > HBAList::HBA_MAX_PER_LIST) {
 331         delete(tgthbaList);
 332         throw InternalError(
 333             "Exceeds max number of adatpers that VSL supports.");
 334     }
 335     delete (tgthbaList);
 336 }


 313     log.debug("Detected %d target mode adapters", tgthbaList->numPorts);
 314     for (int i = 0; i < tgthbaList->numPorts; i++) {
 315         try {
 316             std::string hbapath = FCT_ADAPTER_NAME_PREFIX.c_str();
 317             hbapath += ".";
 318             // move the row with two dimentional uint8 array for WWN
 319             uint64_t tmp = ntohll(*((uint64_t *)&tgthbaList->port_wwn[i][0]));
 320             sprintf(wwnStr, "%llx", tmp);
 321             hbapath += wwnStr;
 322 
 323             HBA *hba = new TgtFCHBA(hbapath);
 324             list.insert(list.begin(), hba);
 325         } catch (...) {
 326             log.debug(
 327                 "Ignoring partial failure while loading an HBA");
 328         }
 329     }
 330     if (tgthbaList->numPorts > HBAList::HBA_MAX_PER_LIST) {
 331         delete(tgthbaList);
 332         throw InternalError(
 333             "Exceeds max number of adapters that VSL supports.");
 334     }
 335     delete (tgthbaList);
 336 }