smfcfg.c revision dd51520e127b452179a2ce4ea3bd8dee949f9afe
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
#include <stdio.h>
#include <stdlib.h>
#include <syslog.h>
#include <stdarg.h>
#include "smfcfg.h"
{
/*
*/
*svcname = '\0';
goto out;
goto out;
handle->fs_service =
goto out;
goto out;
}
} else {
}
return (handle);
out:
return (NULL);
}
void
{
}
}
}
int
{
int valint;
int index = 0;
int ret = 0;
char *p = NULL;
const char *pgname;
/*
* The SVC names we are using currently are already
* appended by default. Fix this for instances project.
*/
if (p == NULL) {
instance = "default";
goto out;
}
return (SMF_SYSTEM_ERR);
}
goto out;
}
goto out;
}
if (fstype == AUTOFS_SMF)
else
pg) != -1) {
goto out;
}
switch (sctype) {
case SCF_TYPE_INTEGER:
errno = 0;
if (errno != 0) {
goto out;
}
goto out;
}
}
break;
case SCF_TYPE_ASTRING:
prop_name, SCF_TYPE_ASTRING) == 0) {
if (scf_value_set_astring(val,
valbuf) == 0) {
if (scf_entry_add_value(entry,
val) != 0) {
goto out;
}
} else
} else
break;
case SCF_TYPE_BOOLEAN:
vint = 1;
vint = 0;
} else {
break;
}
prop_name, SCF_TYPE_BOOLEAN) == 0) {
goto out;
}
} else {
}
break;
}
if (ret != SMF_SYSTEM_ERR)
}
out:
return (ret);
}
int
{
const char *pgname;
/*
* The SVC names we are using currently are already
* appended by default. Fix this for instances project.
*/
if (p == NULL) {
instance = "default";
goto out;
}
return (SMF_SYSTEM_ERR);
return (SMF_SYSTEM_ERR);
}
goto out;
}
if (fstype == AUTOFS_SMF)
else
prop) != SCF_SUCCESS) {
goto out;
}
goto out;
}
switch (sctype) {
case SCF_TYPE_ASTRING:
goto out;
}
ret = 0;
break;
case SCF_TYPE_INTEGER:
goto out;
}
ret = SA_BAD_VALUE;
goto out;
}
ret = 0;
break;
case SCF_TYPE_BOOLEAN:
goto out;
}
if (bval == 1) {
} else {
}
ret = SA_BAD_VALUE;
goto out;
}
break;
}
} else {
}
out:
return (ret);
}
int
{
}
int
{
}
int
{
}
int
{
}
string_to_boolean(const char *str)
{
return (B_TRUE);
} else
return (B_FALSE);
}