| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
That's pretty straightforward and convenient extention: handle all
extra positional arguments as patch file names. This makes it similar to
'cp' and other coreutils basic tools. For example:
osmo-config-merge base.cfg patch1.cfg patch2.cfg patch3.cfg
will apply 3 patches to the base config file.
Change-Id: I212cbdc3bf6f251c1a3175737ac74242fb004c6d
|
|
|
|
|
| |
Change-Id: Ib44f902e5bca2277f1b340d34fabbd2a298d683e
Fixes: Coverity CID#188851
|
|
|
|
|
|
|
|
|
| |
Allocate NULL context after exit_usage() calls and free it before exit
so * sanitizer is happy.
Also handle the error cases gracefully when a file is unreadable or
formatted wrong.
Change-Id: I966e63a3f7d0ff71ee0b88922aa3807d073aa232
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change fixes the following compiler warning:
osmo-config-merge.c: In function ‘main’:
osmo-config-merge.c:268:1: warning: control reaches end
of non-void function [-Wreturn-type]
Despite it isn't critical, let's get rid of this warning.
Change-Id: I7a80a85c8b3180dc086cd9fd20356aab16ea8100
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The existing code passed gerrit build verification but failed the master
builds with the following error:
osmo-config-merge.c:148:4: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for (int i = 0; i < cur_indent - indent; i++) {
^
osmo-config-merge.c:148:4: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your
code
Change-Id: Ia29e85b648c1a427be88242306634efe890e250d
|
|
This utility allows you to merge an incremental config "patch"
into an osmocom-style config file.
The patch file follows the same syntax as the original config file.
It works by appending the leaf nodes of the patch file to the respective
nodes of the input config file.
This process allows configuration file changes/updates to be performed
in a more stable/reliable way than by means of [unified] diff files,
as they break every time the context lines break.
osmo-config-merge doesn't suffer from this problem, as it understands
the tree-like nature of VTY config files.
NITE: This only works with configuration files that have proper
indenting, i.e. every level in the hierarchy must be indented excatly
one character, not multiple.
Change-Id: I61997a3668cc3a40d12ca023272f6d782e6fbefe
|