diff options
Diffstat (limited to 'src/util/gnunet-config-diff.c')
-rw-r--r-- | src/util/gnunet-config-diff.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/util/gnunet-config-diff.c b/src/util/gnunet-config-diff.c new file mode 100644 index 0000000..207b951 --- /dev/null +++ b/src/util/gnunet-config-diff.c @@ -0,0 +1,23 @@ +#include "platform.h" +#include <gnunet_util_lib.h> + +int +main (int argc, char **argv) +{ + struct GNUNET_CONFIGURATION_Handle *i1; + struct GNUNET_CONFIGURATION_Handle *i2; + + if (argc != 3) + { + fprintf (stderr, "Invoke using `%s DEFAULTS-IN DIFFS'\n", argv[0]); + return 1; + } + i1 = GNUNET_CONFIGURATION_create (); + i2 = GNUNET_CONFIGURATION_create (); + if ((GNUNET_OK != GNUNET_CONFIGURATION_load (i1, argv[1])) || + (GNUNET_OK != GNUNET_CONFIGURATION_load (i2, argv[2]))) + return 1; + if (GNUNET_OK != GNUNET_CONFIGURATION_write_diffs (i1, i2, argv[2])) + return 2; + return 0; +} |