Print this page
12309 errors in section 9e of the manual

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man9e/mc_setprop.9e
          +++ new/usr/src/man/man9e/mc_setprop.9e
↓ open down ↓ 3 lines elided ↑ open up ↑
   4    4  .\" You may only use this file in accordance with the terms of version
   5    5  .\" 1.0 of the CDDL.
   6    6  .\"
   7    7  .\" A full copy of the text of the CDDL should have accompanied this
   8    8  .\" source.  A copy of the CDDL is also available via the Internet at
   9    9  .\" http://www.illumos.org/license/CDDL.
  10   10  .\"
  11   11  .\"
  12   12  .\" Copyright 2016 Joyent, Inc.
  13   13  .\"
  14      -.Dd June 02, 2016
       14 +.Dd February 15, 2020
  15   15  .Dt MC_SETPROP 9E
  16   16  .Os
  17   17  .Sh NAME
  18   18  .Nm mc_setprop
  19   19  .Nd set device properties
  20   20  .Sh SYNOPSIS
  21   21  .In sys/mac_provider.h
  22   22  .Ft int
  23   23  .Fo prefix_m_setprop
  24   24  .Fa "void *driver"
↓ open down ↓ 81 lines elided ↑ open up ↑
 106  106  should employ the appropriate locking while writing the properties.
 107  107  .Sh RETURN VALUES
 108  108  Upon successful completion, the device driver should have copied the
 109  109  value of the property into
 110  110  .Fa pr_val
 111  111  and return
 112  112  .Sy 0 .
 113  113  Otherwise, a positive error should be returned to indicate failure.
 114  114  .Sh EXAMPLES
 115  115  The following examples shows how a device driver might structure its
 116      -.Fn mc_setporp
      116 +.Fn mc_setprop
 117  117  entry point.
 118  118  .Bd -literal
 119  119  #include <sys/mac_provider.h>
 120  120  
 121  121  /*
 122  122   * Note, this example merely shows the structure of this function.
 123  123   * Different devices will manage their state in different ways. Like other
 124  124   * examples, this assumes that the device has state in a structure called
 125  125   * example_t and that there is a lock which keeps track of that state.
 126  126   *
 127  127   * For the purpose of this example, we assume that this device supports 100 Mb,
 128  128   * 1 GB, and 10 Gb full duplex speeds.
 129  129   */
 130  130  
 131  131  static int
 132      -exmple_m_setprop(void *arg, const char *pr_name, mac_prop_id_t pr_num,
      132 +example_m_setprop(void *arg, const char *pr_name, mac_prop_id_t pr_num,
 133  133      uint_t pr_valsize, const void *pr_val)
 134  134  {
 135  135          uint32_t new_mtu;
 136  136          int ret = 0;
 137  137          example_t *ep = arg;
 138  138  
 139  139          mutex_enter(&ep->ep_lock);
 140  140          switch (pr_num) {
 141  141          /*
 142  142           * These represent properties that can never be changed, regardless of
↓ open down ↓ 102 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX