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>

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/smhba/common/SMHBAAPILIB.c
          +++ new/usr/src/lib/smhba/common/SMHBAAPILIB.c
↓ open down ↓ 1395 lines elided ↑ open up ↑
1396 1396  
1397 1397  HBA_STATUS
1398 1398  HBA_GetAdapterName(
1399 1399      HBA_UINT32 adapterindex,
1400 1400      char *adaptername)
1401 1401  {
1402 1402          HBA_ADAPTER_INFO        *adapt_infop;
1403 1403          HBA_STATUS              ret = HBA_STATUS_ERROR_ILLEGAL_INDEX;
1404 1404  
1405 1405          if (adaptername == NULL) {
1406      -                DEBUG(1, "HBA_GetAdapterName: NULL pointer adatpername",
     1406 +                DEBUG(1, "HBA_GetAdapterName: NULL pointer adaptername",
1407 1407                      0, 0, 0);
1408 1408                  return (HBA_STATUS_ERROR_ARG);
1409 1409          }
1410 1410  
1411 1411          /*
1412 1412           * The adapter index is from old code, but we have
1413 1413           * to support it.  Go down the list looking for
1414 1414           * the adapter
1415 1415           */
1416 1416          ARE_WE_INITED();
↓ open down ↓ 27 lines elided ↑ open up ↑
1444 1444          HBA_ADAPTER_INFO        *adapt_infop;
1445 1445          HBA_LIBRARY_INFO        *lib_infop;
1446 1446  
1447 1447          DEBUG(2, "OpenAdapter: %s", adaptername, 0, 0);
1448 1448  
1449 1449          handle = HBA_HANDLE_INVALID;
1450 1450          if (_hbaapi_librarylist == NULL) {
1451 1451                  return (handle);
1452 1452          }
1453 1453          if (adaptername == NULL) {
1454      -                DEBUG(1, "HBA_OpenAdapter: NULL pointer adatpername",
     1454 +                DEBUG(1, "HBA_OpenAdapter: NULL pointer adaptername",
1455 1455                      0, 0, 0);
1456 1456                  return (handle);
1457 1457          }
1458 1458          GRAB_MUTEX(&_hbaapi_AL_mutex);
1459 1459          for (adapt_infop = _hbaapi_adapterlist;
1460 1460              adapt_infop != NULL;
1461 1461              adapt_infop = adapt_infop->next) {
1462 1462          if (strcmp(adaptername, adapt_infop->name) != 0) {
1463 1463                  continue;
1464 1464          }
↓ open down ↓ 2857 lines elided ↑ open up ↑
4322 4322          } else {
4323 4323          status = HBA_STATUS_ERROR_NOT_SUPPORTED;
4324 4324          }
4325 4325          RELEASE_MUTEX_RETURN(&_hbaapi_LL_mutex, status);
4326 4326  }
4327 4327  
4328 4328  /*
4329 4329   * Following the similar logic of HBAAPI addaspterevents_callback.
4330 4330   *
4331 4331   * Unlike other events Adapter Add Event is not limited to a specific
4332      - * adpater(i.e. no adatper handle is passed for registration) so
     4332 + * adapter(i.e. no adapter handle is passed for registration) so
4333 4333   * the event should be passed to all registrants.  The routine below
4334 4334   * is passed to the VSLs as a callback and when Adapter Add event is detected
4335 4335   * by VSL it will call smhba_adapteraddevents_callback() which in turn check
4336 4336   * if the passed userdata ptr matches with the one stored in the callback list
4337 4337   * and calls the stored callback.
4338 4338   *
4339 4339   * For the situation that multiple clients are registered for Adapter Add event
4340 4340   * each registration is passed to VSLs so VSL may call
4341 4341   * smhba_adapteraddevents_callback() multiple times or it may call only once
4342 4342   * since the callback function is same.  For this implemneation, the userdata
↓ open down ↓ 646 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX