/*
 * populate_Solaris_NFSShare_property_Values
 * Populates the property array for use in the populate_property_list function
 */
static void
populate_Solaris_PersistentShare_property_values(
    char *hostname,
    fs_dfstab_entry_t fs_dfstab_ents,
    cimchar propValues[PROPCOUNT][MAXSIZE],
    int *err) {

	char		*optValue;

	cim_logDebug("populate_Solaris_PersistentShare_property_values",
	    "Just entring...");

	/*
	 * Key - System name
	 */
	(void) snprintf(propValues[SYSTEMNAME], MAXSIZE, "%s",
	    hostname);

	/*
	 * Get the dfstab entry string
	 */
	optValue = fs_get_Dfstab_share_cmd(fs_dfstab_ents, err);

	if (*err == 0) {
		(void) snprintf(propValues[COMMAND], MAXSIZE, "%s", optValue);
		free(optValue);
	} else {
		*err = EINVAL;
		return;
	}

	/*
	 * Key - creation class name
	 */
	(void) snprintf(propValues[CREATIONCLASSNAME], MAXSIZE, "%s",
	    SOLARIS_PERSISTSHARE);

	/*
	 * Key - Shared Path
	 */
	optValue = fs_get_DFStab_ent_Path(fs_dfstab_ents);
	if (optValue != NULL) {
		(void) snprintf(propValues[SETTINGID], MAXSIZE, "%s", optValue);
	} else {
		*err = EINVAL;
		return;
	}

	/*
	 * Key - System Creation class name
	 */
	(void) snprintf(propValues[SYSTEMCREATIONCLASSNAME], MAXSIZE, "%s",
	    SOLARIS_CS);

	cim_logDebug("populate_Solaris_PersistentShare_property_values",
	    "Returning");

} /* populate_Solaris_PersistentShare_property_values */
Beispiel #2
0
/*
 * used for debugging only
 */
void
fs_print_dfstab_entries(void *list)
{
	while (list != NULL) {

		if (fs_get_DFStab_ent_Fstype(list) != NULL)
			printf("fstype: %s", fs_get_DFStab_ent_Fstype(list));
		if (fs_get_DFStab_ent_Desc(list) != NULL)
			printf(" description: %s",
			    fs_get_DFStab_ent_Desc(list));
		if (fs_get_DFStab_ent_Options(list) != NULL)
			printf(" options: %s",
			    fs_get_DFStab_ent_Options(list));
		if (fs_get_DFStab_ent_Path(list) != NULL)
			printf(" shared path is: %s\n",
			    fs_get_DFStab_ent_Path(list));
		list = (void *)fs_get_DFStab_ent_Next(list);
	}

}