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.man.txt
          +++ new/usr/src/man/man9e/mc_setprop.9e.man.txt
↓ open down ↓ 58 lines elided ↑ open up ↑
  59   59       operations are ongoing, the device driver should employ the appropriate
  60   60       locking while writing the properties.
  61   61  
  62   62  RETURN VALUES
  63   63       Upon successful completion, the device driver should have copied the
  64   64       value of the property into pr_val and return 0.  Otherwise, a positive
  65   65       error should be returned to indicate failure.
  66   66  
  67   67  EXAMPLES
  68   68       The following examples shows how a device driver might structure its
  69      -     mc_setporp() entry point.
       69 +     mc_setprop() entry point.
  70   70  
  71   71       #include <sys/mac_provider.h>
  72   72  
  73   73       /*
  74   74        * Note, this example merely shows the structure of this function.
  75   75        * Different devices will manage their state in different ways. Like other
  76   76        * examples, this assumes that the device has state in a structure called
  77   77        * example_t and that there is a lock which keeps track of that state.
  78   78        *
  79   79        * For the purpose of this example, we assume that this device supports 100 Mb,
  80   80        * 1 GB, and 10 Gb full duplex speeds.
  81   81        */
  82   82  
  83   83       static int
  84      -     exmple_m_setprop(void *arg, const char *pr_name, mac_prop_id_t pr_num,
       84 +     example_m_setprop(void *arg, const char *pr_name, mac_prop_id_t pr_num,
  85   85           uint_t pr_valsize, const void *pr_val)
  86   86       {
  87   87               uint32_t new_mtu;
  88   88               int ret = 0;
  89   89               example_t *ep = arg;
  90   90  
  91   91               mutex_enter(&ep->ep_lock);
  92   92               switch (pr_num) {
  93   93               /*
  94   94                * These represent properties that can never be changed, regardless of
↓ open down ↓ 87 lines elided ↑ open up ↑
 182  182                          because the device has started.  Note that device
 183  183                          driver writers are encouraged to design device drivers
 184  184                          such that this error is not possible.
 185  185  
 186  186       ECANCELLED         The device is in a state that does not allow it to
 187  187                          handle data; for example, it's suspended.
 188  188  
 189  189  SEE ALSO
 190  190       mac(9E), mac_register(9F), strcmp(9F), mac_register(9S)
 191  191  
 192      -illumos                          June 2, 2016                          illumos
      192 +illumos                        February 15, 2020                       illumos
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX