aboutsummaryrefslogtreecommitdiff
path: root/src/util/gnunet-config-diff.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/gnunet-config-diff.c')
-rw-r--r--src/util/gnunet-config-diff.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/util/gnunet-config-diff.c b/src/util/gnunet-config-diff.c
new file mode 100644
index 000000000..3c0af8f24
--- /dev/null
+++ b/src/util/gnunet-config-diff.c
@@ -0,0 +1,28 @@
1#include "platform.h"
2#include <gnunet_util_lib.h>
3
4int main(int argc,
5 char **argv)
6{
7 struct GNUNET_CONFIGURATION_Handle *i1;
8 struct GNUNET_CONFIGURATION_Handle *i2;
9
10 if (argc != 3)
11 {
12 fprintf (stderr,
13 "Invoke using `%s DEFAULTS-IN DIFFS'\n",
14 argv[0]);
15 return 1;
16 }
17 i1 = GNUNET_CONFIGURATION_create ();
18 i2 = GNUNET_CONFIGURATION_create ();
19 if ( (GNUNET_OK !=
20 GNUNET_CONFIGURATION_load (i1, argv[1])) ||
21 (GNUNET_OK !=
22 GNUNET_CONFIGURATION_load (i2, argv[2])) )
23 return 1;
24 if (GNUNET_OK !=
25 GNUNET_CONFIGURATION_write_diffs (i1, i2, argv[2]))
26 return 2;
27 return 0;
28}