Print this page
OS-249

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/ibd_upgrade/ibd_delete_link.c
          +++ new/usr/src/cmd/ibd_upgrade/ibd_delete_link.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  /*
  23   23   * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
       24 + * Copyright (c) 2011, Joyent Inc. All rights reserved.
  24   25   */
  25   26  
  26   27  #include <stdio.h>
  27   28  #include <door.h>
  28   29  #include <errno.h>
  29   30  #include <strings.h>
  30   31  #include <sys/mman.h>
  31   32  #include <libdladm.h>
  32   33  #include <libdlib.h>
  33   34  #include <libdllink.h>
↓ open down ↓ 45 lines elided ↑ open up ↑
  79   80  ibd_delete_link(dladm_handle_t dlh, char *link)
  80   81  {
  81   82          dlmgmt_door_getlinkid_t         getlinkid;
  82   83          dlmgmt_getlinkid_retval_t       retval;
  83   84          datalink_id_t                   linkid;
  84   85          dladm_status_t                  status;
  85   86          char                            errmsg[DLADM_STRSIZE];
  86   87  
  87   88          getlinkid.ld_cmd = DLMGMT_CMD_GETLINKID;
  88   89          (void) strlcpy(getlinkid.ld_link, link, MAXLINKNAMELEN);
       90 +        getlinkid.ld_zoneid = -1;
  89   91  
  90   92          if ((status = ibd_dladm_door_call(dlh, &getlinkid, sizeof (getlinkid),
  91   93              &retval, sizeof (retval))) != DLADM_STATUS_OK) {
  92   94                  (void) fprintf(stderr,
  93   95                      "dladm_door_call failed: %s; linkname = %s\n",
  94   96                      dladm_status2str(status, errmsg), link);
  95   97                  return (status);
  96   98          }
  97   99  
  98  100          if (retval.lr_class != DATALINK_CLASS_PHYS) {
↓ open down ↓ 53 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX