rpm
5.4.15
|
Go to the source code of this file.
Macros | |
#define | rpmaugUnlink(_aug) ((rpmaug)rpmioUnlinkPoolItem((rpmioItem)(_aug), __FUNCTION__, __FILE__, __LINE__)) |
#define | rpmaugLink(_aug) ((rpmaug)rpmioLinkPoolItem((rpmioItem)(_aug), __FUNCTION__, __FILE__, __LINE__)) |
#define | rpmaugFree(_aug) ((rpmaug)rpmioFreePoolItem((rpmioItem)(_aug), __FUNCTION__, __FILE__, __LINE__)) |
Typedefs | |
typedef struct rpmaug_s * | rpmaug |
Functions | |
rpmaug | rpmaugUnlink (rpmaug aug) |
Unreference a augeas wrapper instance. More... | |
rpmaug | rpmaugLink (rpmaug aug) |
Reference a augeas wrapper instance. More... | |
rpmaug | rpmaugFree (rpmaug aug) |
Destroy a augeas wrapper. More... | |
rpmaug | rpmaugNew (const char *root, const char *loadpath, unsigned int flags) |
Create and load a augeas wrapper. More... | |
int | rpmaugDefvar (rpmaug aug, const char *name, const char *expr) |
Define an augeas variable. More... | |
int | rpmaugDefnode (rpmaug aug, const char *name, const char *expr, const char *value, int *created) |
Define an augeas node. More... | |
int | rpmaugGet (rpmaug aug, const char *path, const char **value) |
Get the value associated with a path. More... | |
int | rpmaugSet (rpmaug aug, const char *path, const char *value) |
Set the value associated with a path. More... | |
int | rpmaugInsert (rpmaug aug, const char *path, const char *label, int before) |
Insert new sibling node before/after a given node. More... | |
int | rpmaugRm (rpmaug aug, const char *path) |
Remove node and associated sub-tree. More... | |
int | rpmaugMv (rpmaug aug, const char *src, const char *dst) |
Move src node to dst node. More... | |
int | rpmaugMatch (rpmaug aug, const char *path, char ***matches) |
Return path(s) in tree that match an expression. More... | |
int | rpmaugSave (rpmaug aug) |
Save changed files to disk, appending .augnew or .augsave as requested. More... | |
int | rpmaugLoad (rpmaug aug) |
Load files/lenses from disk. More... | |
int | rpmaugPrint (rpmaug aug, FILE *out, const char *path) |
Print node paths that match an expression. More... | |
void | rpmaugFprintf (rpmaug aug, const char *fmt,...) |
Append augeas output to an iob. More... | |
rpmRC | rpmaugRun (rpmaug aug, const char *str, const char **resultp) |
Run augeas commands from a buffer. More... | |
Variables | |
int | _rpmaug_debug |
rpmaug | _rpmaugI |
const char * | _rpmaugRoot |
const char * | _rpmaugLoadpath |
unsigned int | _rpmaugFlags |
struct poptOption | rpmaugPoptTable [] |
Popt option table for options to configure Augeas augtool. More... | |
#define rpmaugFree | ( | _aug | ) | ((rpmaug)rpmioFreePoolItem((rpmioItem)(_aug), __FUNCTION__, __FILE__, __LINE__)) |
#define rpmaugLink | ( | _aug | ) | ((rpmaug)rpmioLinkPoolItem((rpmioItem)(_aug), __FUNCTION__, __FILE__, __LINE__)) |
#define rpmaugUnlink | ( | _aug | ) | ((rpmaug)rpmioUnlinkPoolItem((rpmioItem)(_aug), __FUNCTION__, __FILE__, __LINE__)) |
int rpmaugDefnode | ( | rpmaug | aug, |
const char * | name, | ||
const char * | expr, | ||
const char * | value, | ||
int * | created | ||
) |
Define an augeas node.
aug | augeas wrapper (NULL uses global interpreter) |
name | variable name |
expr | expression to be evaluated (must eval to a nodeset) |
value | initial node value (if creating) |
*created | 1 if node was created |
Definition at line 179 of file rpmaug.c.
Referenced by cmd_defnode().
int rpmaugDefvar | ( | rpmaug | aug, |
const char * | name, | ||
const char * | expr | ||
) |
Define an augeas variable.
aug | augeas wrapper (NULL uses global interpreter) |
name | variable name |
expr | expression to be evaluated |
Definition at line 165 of file rpmaug.c.
Referenced by cmd_defvar().
void rpmaugFprintf | ( | rpmaug | aug, |
const char * | fmt, | ||
... | |||
) |
Append augeas output to an iob.
aug | augeas wrapper (NULL uses global interpreter) |
fmt | format to use |
Definition at line 322 of file rpmaug.c.
References _free(), b, rpmiobAppend(), vsnprintf(), xmalloc, and xrealloc.
Referenced by cmd_clear(), cmd_defnode(), cmd_defvar(), cmd_get(), cmd_help(), cmd_ins(), cmd_load(), cmd_ls(), cmd_match(), cmd_mv(), cmd_rm(), cmd_save(), cmd_set(), and rpmaugRun().
Destroy a augeas wrapper.
aug | augeas wrapper |
Referenced by expandMacro(), and rpmioClean().
int rpmaugGet | ( | rpmaug | aug, |
const char * | path, | ||
const char ** | value | ||
) |
Get the value associated with a path.
aug | augeas wrapper (NULL uses global interpreter) |
path | path to lookup |
*value | returned value (malloc'd) |
Definition at line 194 of file rpmaug.c.
Referenced by cmd_get(), cmd_ls(), and cmd_match().
int rpmaugInsert | ( | rpmaug | aug, |
const char * | path, | ||
const char * | label, | ||
int | before | ||
) |
Insert new sibling node before/after a given node.
aug | augeas wrapper (NULL uses global interpreter) |
path | path to node in tree |
label | label to insert |
before | insert label into tree before path? (else after) |
Definition at line 222 of file rpmaug.c.
Referenced by cmd_ins().
Reference a augeas wrapper instance.
aug | augeas wrapper |
Referenced by rpmaugNew().
int rpmaugLoad | ( | rpmaug | aug | ) |
Load files/lenses from disk.
aug | augeas wrapper (NULL uses global interpreter) |
Definition at line 292 of file rpmaug.c.
Referenced by cmd_load().
int rpmaugMatch | ( | rpmaug | aug, |
const char * | path, | ||
char *** | matches | ||
) |
Return path(s) in tree that match an expression.
aug | augeas wrapper (NULL uses global interpreter) |
path | path expression to match |
*matches | paths that match |
Definition at line 264 of file rpmaug.c.
Referenced by child_count(), cmd_load(), cmd_ls(), cmd_match(), and cmd_save().
int rpmaugMv | ( | rpmaug | aug, |
const char * | src, | ||
const char * | dst | ||
) |
rpmaug rpmaugNew | ( | const char * | root, |
const char * | loadpath, | ||
unsigned int | flags | ||
) |
Create and load a augeas wrapper.
root | augeas filesystem root |
loadpath | augeas load path (colon separated) |
flags | augeas flags |
Definition at line 132 of file rpmaug.c.
References _rpmaugLoadpath, _rpmaugRoot, flags, rpmaugGetPool(), rpmaugLink(), rpmiobNew(), and xstrdup().
Referenced by expandMacro().
int rpmaugPrint | ( | rpmaug | aug, |
FILE * | out, | ||
const char * | path | ||
) |
Print node paths that match an expression.
aug | augeas wrapper (NULL uses global interpreter) |
out | ouput file (NULL uses stdout) |
path | node path expression |
Definition at line 306 of file rpmaug.c.
Referenced by cmd_print().
int rpmaugRm | ( | rpmaug | aug, |
const char * | path | ||
) |
Run augeas commands from a buffer.
aug | augeas wrapper (NULL uses global interpreter) |
str | augeas commands to run |
*resultp | output running augeas commands |
Definition at line 763 of file rpmaug.c.
References _free(), rpmioP_s::ac, argvFree(), rpmioP_s::av, rpmaugFprintf(), rpmiobStr(), rpmioParse(), RPMRC_FAIL, RPMRC_NOTFOUND, RPMRC_OK, and rpmioP_s::str.
Referenced by expandMacro().
int rpmaugSave | ( | rpmaug | aug | ) |
Save changed files to disk, appending .augnew or .augsave as requested.
aug | augeas wrapper (NULL uses global interpreter) |
Definition at line 278 of file rpmaug.c.
Referenced by cmd_save().
int rpmaugSet | ( | rpmaug | aug, |
const char * | path, | ||
const char * | value | ||
) |
Set the value associated with a path.
aug | augeas wrapper (NULL uses global interpreter) |
path | path to lookup |
value | value |
Definition at line 208 of file rpmaug.c.
Referenced by cmd_clear(), and cmd_set().
Unreference a augeas wrapper instance.
aug | augeas wrapper |
unsigned int _rpmaugFlags |
Definition at line 80 of file rpmaug.c.
Referenced by expandMacro().
rpmaug _rpmaugI |
Definition at line 36 of file rpmaug.c.
Referenced by rpmioClean().
const char* _rpmaugLoadpath |
Definition at line 79 of file rpmaug.c.
Referenced by expandMacro(), and rpmaugNew().
const char* _rpmaugRoot |
Definition at line 76 of file rpmaug.c.
Referenced by expandMacro(), and rpmaugNew().