aboutsummaryrefslogtreecommitdiff
path: root/src/util/gnunet-config-diff.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-08-01 12:33:46 +0000
committerChristian Grothoff <christian@grothoff.org>2011-08-01 12:33:46 +0000
commit9f028b17045b8e5c329a84010a182b0e69044728 (patch)
treebc8ccfd316f1b6ec6e5df4f44c7ef3e4bb0bec25 /src/util/gnunet-config-diff.c
parente666ca695d41c606c4fdc54fb52d04c0b8b85625 (diff)
downloadgnunet-9f028b17045b8e5c329a84010a182b0e69044728.tar.gz
gnunet-9f028b17045b8e5c329a84010a182b0e69044728.zip
differ
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}