Print this page
Adding AoE support to nza-kernel

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/stmfadm/stmfadm.c
          +++ new/usr/src/cmd/stmfadm/stmfadm.c
↓ open down ↓ 10 lines elided ↑ open up ↑
  11   11   * and limitations under the License.
  12   12   *
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
       21 +
  21   22  /*
  22   23   * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  23   24   * Use is subject to license terms.
       25 + *
  24   26   * Copyright 2012 Milan Jurik. All rights reserved.
       27 + * Copyright 2012 Nexenta Systems, Inc. All rights reserved.
  25   28   */
  26   29  
  27   30  #include <stdlib.h>
  28   31  #include <stdio.h>
  29   32  #include <strings.h>
  30   33  #include <sys/types.h>
  31   34  #include <unistd.h>
  32   35  #include <wchar.h>
  33   36  #include <libintl.h>
  34   37  #include <errno.h>
↓ open down ↓ 493 lines elided ↑ open up ↑
 528  531                          return (-1);
 529  532                  } else if (checkHexUpper(mbString + 4) != 0) {
 530  533                          return (-1);
 531  534                  }
 532  535          } else if (strncmp(mbString, "eui.", 4) == 0) {
 533  536                  if ((len = strlen(mbString + 4)) != SNS_EUI_16) {
 534  537                          return (-1);
 535  538                  } else if (checkHexUpper(mbString + 4) != 0) {
 536  539                          return (-1);
 537  540                  }
 538      -        } else {
 539      -                return (-1);
      541 +        /*
      542 +         * If none of iqn., wwn., and eui. matches, it might be a
      543 +         * name string for AoE.
      544 +         */
 540  545          }
 541  546  
 542  547          /*
 543  548           * We have a validated name string.
 544  549           * Go ahead and set the length and copy it.
 545  550           */
 546  551          devid->identLength = strlen(mbString);
 547  552          bzero(devid->ident, STMF_IDENT_LENGTH);
 548  553          bcopy(mbString, devid->ident, devid->identLength);
 549  554  
↓ open down ↓ 2965 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX