Print this page




   5  * The contents of this file are subject to the terms of the
   6  * Common Development and Distribution License (the "License").
   7  * You may not use this file except in compliance with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 
  23 /*
  24  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  25  * Copyright (c) 2011, Joyent Inc. All rights reserved.
  26  */
  27 
  28 #include <assert.h>
  29 #include <string.h>
  30 #include <libintl.h>
  31 #include "zonecfg.h"
  32 #include "zonecfg_grammar.tab.h"
  33 
  34 /*
  35  * This constant defines the number of entries added to unclaimed_tokens[]
  36  * when it runs out of space.
  37  */
  38 #define UNCLAIMED_TOKENS_BUFFER_GROWTH  4
  39 
  40 /*
  41  * Invariants:
  42  *
  43  *      unclaimed_tokens == NULL IFF unclaimed_tokens_size == 0
  44  *      unclaimed_tokens_size == 0 IFF num_unclaimed_tokens == 0
  45  */


 305 <CSTATE>max-msg-ids       { return MAXMSGIDS; }
 306 
 307 <TSTATE>max-sem-ids       { return MAXSEMIDS; }
 308 <CSTATE>max-sem-ids       { return MAXSEMIDS; }
 309 
 310 <TSTATE>scheduling-class  { return SCHED; }
 311 <CSTATE>scheduling-class  { return SCHED; }
 312 
 313 <TSTATE>hostid            { return HOSTID; }
 314 <CSTATE>hostid            { return HOSTID; }
 315 
 316 <TSTATE>user      { return USER; }
 317 <CSTATE>user      { return USER; }
 318 
 319 <TSTATE>auths     { return AUTHS; }
 320 <CSTATE>auths     { return AUTHS; }
 321 
 322 <TSTATE>fs-allowed        { return FS_ALLOWED; }
 323 <CSTATE>fs-allowed        { return FS_ALLOWED; }
 324 
 325 <TSTATE>uuid      { return UUID; }
 326 <CSTATE>uuid      { return UUID; }
 327 
 328 <TSTATE>zfs-io-priority   { return ZFSPRI; }
 329 <CSTATE>zfs-io-priority   { return ZFSPRI; }
 330 
 331 <TSTATE>= { return EQUAL; }
 332 <LSTATE>= { return EQUAL; }
 333 <CSTATE>= { return EQUAL; }
 334 
 335 <TSTATE>"["       {
 336                         BEGIN LSTATE;
 337                         state = LSTATE;
 338                         return OPEN_SQ_BRACKET;
 339                 }
 340 
 341 <LSTATE>"]"       {
 342                         BEGIN TSTATE;
 343                         state = TSTATE;
 344                         return CLOSE_SQ_BRACKET;
 345                 }
 346 
 347 <TSTATE>"("       {
 348                         BEGIN CSTATE;
 349                         return OPEN_PAREN;
 350                 }




   5  * The contents of this file are subject to the terms of the
   6  * Common Development and Distribution License (the "License").
   7  * You may not use this file except in compliance with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 
  23 /*
  24  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.

  25  */
  26 
  27 #include <assert.h>
  28 #include <string.h>
  29 #include <libintl.h>
  30 #include "zonecfg.h"
  31 #include "zonecfg_grammar.tab.h"
  32 
  33 /*
  34  * This constant defines the number of entries added to unclaimed_tokens[]
  35  * when it runs out of space.
  36  */
  37 #define UNCLAIMED_TOKENS_BUFFER_GROWTH  4
  38 
  39 /*
  40  * Invariants:
  41  *
  42  *      unclaimed_tokens == NULL IFF unclaimed_tokens_size == 0
  43  *      unclaimed_tokens_size == 0 IFF num_unclaimed_tokens == 0
  44  */


 304 <CSTATE>max-msg-ids       { return MAXMSGIDS; }
 305 
 306 <TSTATE>max-sem-ids       { return MAXSEMIDS; }
 307 <CSTATE>max-sem-ids       { return MAXSEMIDS; }
 308 
 309 <TSTATE>scheduling-class  { return SCHED; }
 310 <CSTATE>scheduling-class  { return SCHED; }
 311 
 312 <TSTATE>hostid            { return HOSTID; }
 313 <CSTATE>hostid            { return HOSTID; }
 314 
 315 <TSTATE>user      { return USER; }
 316 <CSTATE>user      { return USER; }
 317 
 318 <TSTATE>auths     { return AUTHS; }
 319 <CSTATE>auths     { return AUTHS; }
 320 
 321 <TSTATE>fs-allowed        { return FS_ALLOWED; }
 322 <CSTATE>fs-allowed        { return FS_ALLOWED; }
 323 






 324 <TSTATE>= { return EQUAL; }
 325 <LSTATE>= { return EQUAL; }
 326 <CSTATE>= { return EQUAL; }
 327 
 328 <TSTATE>"["       {
 329                         BEGIN LSTATE;
 330                         state = LSTATE;
 331                         return OPEN_SQ_BRACKET;
 332                 }
 333 
 334 <LSTATE>"]"       {
 335                         BEGIN TSTATE;
 336                         state = TSTATE;
 337                         return CLOSE_SQ_BRACKET;
 338                 }
 339 
 340 <TSTATE>"("       {
 341                         BEGIN CSTATE;
 342                         return OPEN_PAREN;
 343                 }