6185db853e024a486ff8837e6784dd290d866112dougm * CDDL HEADER START
6185db853e024a486ff8837e6784dd290d866112dougm * The contents of this file are subject to the terms of the
6185db853e024a486ff8837e6784dd290d866112dougm * Common Development and Distribution License (the "License").
6185db853e024a486ff8837e6784dd290d866112dougm * You may not use this file except in compliance with the License.
6185db853e024a486ff8837e6784dd290d866112dougm * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6185db853e024a486ff8837e6784dd290d866112dougm * See the License for the specific language governing permissions
6185db853e024a486ff8837e6784dd290d866112dougm * and limitations under the License.
6185db853e024a486ff8837e6784dd290d866112dougm * When distributing Covered Code, include this CDDL HEADER in each
6185db853e024a486ff8837e6784dd290d866112dougm * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6185db853e024a486ff8837e6784dd290d866112dougm * If applicable, add the following below this CDDL HEADER, with the
6185db853e024a486ff8837e6784dd290d866112dougm * fields enclosed by brackets "[]" replaced with your own identifying
6185db853e024a486ff8837e6784dd290d866112dougm * information: Portions Copyright [yyyy] [name of copyright owner]
6185db853e024a486ff8837e6784dd290d866112dougm * CDDL HEADER END
546405c3c5a146c88705b0b02a469d1bd57f2b53dougm * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
6185db853e024a486ff8837e6784dd290d866112dougm * Use is subject to license terms.
6185db853e024a486ff8837e6784dd290d866112dougm#pragma ident "%Z%%M% %I% %E% SMI"
6185db853e024a486ff8837e6784dd290d866112dougm * Utility functions shared by sharemgr and sharectl.
6185db853e024a486ff8837e6784dd290d866112dougm * add_opt(optlist, optarg, security?)
6185db853e024a486ff8837e6784dd290d866112dougm * Add a new parsed option to the option list provided.
6185db853e024a486ff8837e6784dd290d866112dougm * If the option is a security option, only add if we are
6185db853e024a486ff8837e6784dd290d866112dougm * processing security options.
6185db853e024a486ff8837e6784dd290d866112dougmadd_opt(struct options **optlistp, char *optarg, int unset)
6185db853e024a486ff8837e6784dd290d866112dougm newopt = (struct options *)malloc(sizeof (struct options));
546405c3c5a146c88705b0b02a469d1bd57f2b53dougm /* extract property/value pair */
546405c3c5a146c88705b0b02a469d1bd57f2b53dougm * Check to see if this is a duplicate
546405c3c5a146c88705b0b02a469d1bd57f2b53dougm * value. We want to replace the first
546405c3c5a146c88705b0b02a469d1bd57f2b53dougm * instance with the second.