GNUnet  0.10.x
gnunet-config-diff.c
Go to the documentation of this file.
1 #include "platform.h"
2 #include <gnunet_util_lib.h>
3 
4 int
5 main(int argc, char **argv)
6 {
9 
10  if (argc != 3)
11  {
12  fprintf(stderr, "Invoke using `%s DEFAULTS-IN DIFFS'\n", argv[0]);
13  return 1;
14  }
17  if ((GNUNET_OK != GNUNET_CONFIGURATION_load(i1, argv[1])) ||
18  (GNUNET_OK != GNUNET_CONFIGURATION_load(i2, argv[2])))
19  return 1;
20  if (GNUNET_OK != GNUNET_CONFIGURATION_write_diffs(i1, i2, argv[2]))
21  return 2;
22  return 0;
23 }
#define GNUNET_OK
Named constants for return values.
Definition: gnunet_common.h:75
struct GNUNET_CONFIGURATION_Handle * GNUNET_CONFIGURATION_create(void)
Create a new configuration object.
int GNUNET_CONFIGURATION_load(struct GNUNET_CONFIGURATION_Handle *cfg, const char *filename)
Load configuration.
int GNUNET_CONFIGURATION_write_diffs(const struct GNUNET_CONFIGURATION_Handle *cfg_default, const struct GNUNET_CONFIGURATION_Handle *cfg_new, const char *filename)
Write only configuration entries that have been changed to configuration file.
configuration data
Definition: configuration.c:83
int main(int argc, char **argv)