Print this page
6601 Various GLD drivers return EINVAL instead of ENOTSUP for unused mac_prop_id_t's
Reviewed by: Garrett D'Amore <garrett@damore.org>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/vnic/vnic_dev.c
          +++ new/usr/src/uts/common/io/vnic/vnic_dev.c
↓ open down ↓ 13 lines elided ↑ open up ↑
  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   * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
  23   23   * Copyright 2015 Joyent, Inc.
       24 + * Copyright 2016 OmniTI Computer Consulting, Inc. All rights reserved.
  24   25   */
  25   26  
  26   27  #include <sys/types.h>
  27   28  #include <sys/cred.h>
  28   29  #include <sys/sysmacros.h>
  29   30  #include <sys/conf.h>
  30   31  #include <sys/cmn_err.h>
  31   32  #include <sys/list.h>
  32   33  #include <sys/ksynch.h>
  33   34  #include <sys/kmem.h>
↓ open down ↓ 1057 lines elided ↑ open up ↑
1091 1092      uint_t pr_valsize, void *pr_val)
1092 1093  {
1093 1094          vnic_t          *vn = arg;
1094 1095          int             ret = 0;
1095 1096  
1096 1097          switch (pr_num) {
1097 1098          case MAC_PROP_SECONDARY_ADDRS:
1098 1099                  ret = vnic_get_secondary_macs(vn, pr_valsize, pr_val);
1099 1100                  break;
1100 1101          default:
1101      -                ret = EINVAL;
     1102 +                ret = ENOTSUP;
1102 1103                  break;
1103 1104          }
1104 1105  
1105 1106          return (ret);
1106 1107  }
1107 1108  
1108 1109  /* ARGSUSED */
1109 1110  static void vnic_m_propinfo(void *m_driver, const char *pr_name,
1110 1111      mac_prop_id_t pr_num, mac_prop_info_handle_t prh)
1111 1112  {
↓ open down ↓ 120 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX