src/plugins/augeas/augeas.c
/**
 * Creates a new Elektra key from the specified Augeas key.
 * If any step during key conversion fails, an error is returned
 * in order to prevent inconsistent keys.
 */
Creates a new Elektra key from the specified Augeas key.
If any step during key conversion fails, an error is returned
in order to prevent inconsistent keys.
Creates a new Elektra key from the specified Augeas key . If any step during key conversion fails an error is returned in order to prevent inconsistent keys .
static int convertToKey (augeas * handle, const char * treePath, void * data)
{
	struct KeyConversion * conversionData = (struct KeyConversion *)data;
	int result = 0;
	const char * value = 0;
	result = aug_get (handle, treePath, &value);
	if (result < 0) return result;
	Key * key = createKeyFromPath (conversionData->parentKey, treePath);
	keySetString (key, value);
	conversionData->currentOrder++;
	result = keySetOrderMeta (key, conversionData->currentOrder);
	if (result < 0) return result;
	result = ksAppendKey (conversionData->ks, key);
	return result;
}
static int convertToKey ( augeas * handle , const char * treePath , void * data ) { struct KeyConversion * conversionData = ( struct KeyConversion * ) data ; int result = 0 ; const char * value = 0 ; result = aug_get ( handle , treePath , & value ) ; if ( result < 0 ) return result ; Key * key = createKeyFromPath ( conversionData -> parentKey , treePath ) ; keySetString ( key , value ) ; conversionData -> currentOrder ++ ; result = keySetOrderMeta ( key , conversionData -> currentOrder ) ; if ( result < 0 ) return result ; result = ksAppendKey ( conversionData -> ks , key ) ; return result ; }
Creates a new Elektra key from the specified Augeas key.
Creates a new Elektra key from the specified Augeas key .
/* we were unable to retrieve the augeas value */ /* fill key values */ /* setting the correct key order failed */