nfsprov_methods.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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
*/
/*
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "nfsprov_methods.h"
#include "util.h"
#include "libfsmgt.h"
#include "util.h"
#include "cmdgen.h"
#include "nfs_providers_msgstrings.h"
#include "messageStrings.h"
#include "nfs_provider_names.h"
/*
* Public methods
*/
/*
* Method: create_outParams_list
*
* Description: Creates a string or a string array property to be added to the
* passed in CCIMPropertyList*, outParams.
*
* Parameters:
* - CCIMPropertyList *outParams - The property list to add the string
* array property to.
* - char **list - The string array to add to outParams.
* - int num_elements - The number of elements in list.
* - char *single_value - The string to add to outParams.
*
* Returns:
* - Nothing
*/
void
int num_elements, char *single_value) {
int err = 0;
/*
* cim_encodeStringArray converts an array or strings into a
* regular string for placement into the CCIMProperty.
*/
if (outParamValues == NULL) {
ex = cim_getLastError();
return;
}
} else if (single_value != NULL) {
}
ex = cim_getLastError();
return;
}
ex = cim_getLastError();
return;
}
} /* create_outParams_list */
/*
* Method: del_all_with_duplicate_path
*
* defined with the passed in parameter list.
*
* Parameters:
* - CCIMPropertyList *inParams - The input parameter list containing
*
* Returns:
* - CCIMProperty * - A property defining the success or failure of the
* method.
*/
int err = 0;
char *path;
return ((CCIMProperty *)NULL);
}
return ((CCIMProperty *)NULL);
}
if (err != 0) {
return ((CCIMProperty *)NULL);
}
}
}
/*
* Method: get_default_secmode
*
* Description: Retrieves the default security mode for the system and places
* it in the passed in outParams property list.
*
* Parameters:
* - CCIMPropertyList *outParams - The property list for which to add the
* security mode property.
*
* Returns:
* - CCIMProperty * - A property defining the success or failure of the
* method.
*/
char *defmode;
int err = 0;
return ((CCIMProperty *)NULL);
}
/*
* An error occurred in create_outParams_list.
*/
return ((CCIMProperty *)NULL);
}
} /* get_default_secmode */
/*
* Method: get_netconfig_list
*
* it in the passed in outParams property list.
*
* Parameters:
* - CCIMPropertyList *outParams - The property list for which to add the
* network id list.
*
* Returns:
* - CCIMProperty * - A property defining the success or failure of the
* method.
*/
char **netid_list;
int num_elements = 0;
int err = 0;
if (netid_list == NULL) {
return ((CCIMProperty *)NULL);
}
/*
* An error occurred in create_outParams_list. It was
* handled in that function so just return NULL.
*/
return ((CCIMProperty *)NULL);
}
cim_false));
} /* get_netconfig_list */
/*
* Method: get_nfssec_list
*
* Description: Retrieves the list of nfs security modes from /etc/nfssec.conf
* and places it in the passed in outParams property list.
*
* Parameters:
* - CCIMPropertyList *outParams - The property list for which to add the
* nfs security modes list.
*
* Returns:
* - CCIMProperty * - A property defining the success or failure of the
* method.
*/
char **secmode_list;
int num_elements = 0;
int err = 0;
if (secmode_list == NULL) {
return ((CCIMProperty *)NULL);
}
/*
* An error occurred in create_outParams_list.
*/
return ((CCIMProperty *)NULL);
}
} /* get_nfssec_list */
/*
* Method: mountall
*
* Description: Executes the mountall command with the options given in the
* inParams property list.
*
* Parameters:
* - CCIMPropertyList *inParams - The property list containing the options
* to be used when executing the mountall command.
*
* Returns:
* - CCIMProperty * - A property defining the success or failure of the
* method.
*/
int err = 0;
&err);
return ((CCIMProperty *)NULL);
}
return (retVal);
} /* mountall */
/*
* Method: shareall
*
* Description: Executes the shareall command with the options given in the
* inParams property list.
*
* Parameters:
* - CCIMPropertyList *inParams - The property list containing the options
* to be used when executing the shareall command.
*
* Returns:
* - CCIMProperty * - A property defining the success or failure of the
* method.
*/
int err = 0;
&err);
return ((CCIMProperty *)NULL);
}
return (retVal);
} /* shareall */
/*
* Method: unmountall
*
* Description: Executes the umountall command with the options given in the
* inParams property list.
*
* Parameters:
* - CCIMPropertyList *inParams - The property list containing the options
* to be used when executing the umountall command.
*
* Returns:
* - CCIMProperty * - A property defining the success or failure of the
* method.
*/
int err = 0;
&err);
return ((CCIMProperty *)NULL);
}
return (retVal);
} /* unmountall */
/*
* Method: unshareall
*
* Description: Executes the unshareall command with the options given in the
* inParams property list.
*
* Parameters:
* - CCIMPropertyList *inParams - The property list containing the options
* to be used when executing the unshareall command.
*
* Returns:
* - CCIMProperty * - A property defining the success or failure of the
* method.
*/
int err = 0;
&err);
return ((CCIMProperty *)NULL);
}
return (retVal);
} /* unshareall */
/*
* Private Methods
*/
/*
* Method: exec_command
*
* and handles errors from the execution of the command if needed.
*
* Parameters:
* - char *cmd - The command to execute.
*
* Returns:
* - CCIMProperty * - A property defining the success or failure of the
* method.
* - NULL if an error occurred.
*/
exec_command(char *cmd) {
char *cmd_return = NULL;
int err = 0;
if (err != 0) {
if (cmd_return != NULL) {
return ((CCIMProperty *)NULL);
} else {
return ((CCIMProperty *)NULL);
}
}
if (cmd_return != NULL) {
}
} /* exec_command */