Print this page
OS-192 zone_create() warning on headnode

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libc/port/sys/zone.c
          +++ new/usr/src/lib/libc/port/sys/zone.c
↓ open down ↓ 14 lines elided ↑ open up ↑
  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 2009 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
       25 + * Copyright 2011 Joyent Inc.  All rights reserved.
  25   26   */
  26   27  
  27   28  #include "lint.h"
  28   29  #include <sys/types.h>
  29   30  #include <sys/syscall.h>
  30   31  #include <sys/zone.h>
  31   32  #include <sys/priv.h>
  32   33  #include <priv_private.h>
  33   34  #include <zone.h>
  34   35  #include <sys/tsol/label.h>
  35   36  #include <dlfcn.h>
  36   37  #include <stdlib.h>
  37   38  #include <errno.h>
  38   39  
  39   40  zoneid_t
  40   41  zone_create(const char *name, const char *root, const struct priv_set *privs,
  41   42      const char *rctls, size_t rctlsz, const char *zfs, size_t zfssz,
  42      -    int *extended_error, int match, int doi, const bslabel_t *label, int flags)
       43 +    int *extended_error, int match, int doi, const bslabel_t *label, int flags,
       44 +    zoneid_t zone_did)
  43   45  {
  44   46          zone_def  zd;
  45   47          priv_data_t *d;
  46   48  
  47   49          LOADPRIVDATA(d);
  48   50  
  49   51          zd.zone_name = name;
  50   52          zd.zone_root = root;
  51   53          zd.zone_privs = privs;
  52   54          zd.zone_privssz = d->pd_setsize;
  53   55          zd.rctlbuf = rctls;
  54   56          zd.rctlbufsz = rctlsz;
  55   57          zd.zfsbuf = zfs;
  56   58          zd.zfsbufsz = zfssz;
  57   59          zd.extended_error = extended_error;
  58   60          zd.match = match;
  59   61          zd.doi = doi;
  60   62          zd.label = label;
  61   63          zd.flags = flags;
       64 +        zd.zone_did = zone_did;
  62   65  
  63   66          return ((zoneid_t)syscall(SYS_zone, ZONE_CREATE, &zd));
  64   67  }
  65   68  
  66   69  int
  67   70  zone_boot(zoneid_t zoneid)
  68   71  {
  69   72          return (syscall(SYS_zone, ZONE_BOOT, zoneid));
  70   73  }
  71   74  
↓ open down ↓ 172 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX