-only trigger check config if we actually need it
[oweals/gnunet.git] / src / fs / gnunet-fs.c
index 0b28923712487f4e46ffc707cf4b0b1e127f1abc..7c20e025fce98d2706cbb0b76130fe74d2d0a8b2 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2011 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2011 GNUnet e.V.
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -14,8 +14,8 @@
 
      You should have received a copy of the GNU General Public License
      along with GNUnet; see the file COPYING.  If not, write to the
-     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-     Boston, MA 02111-1307, USA.
+     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+     Boston, MA 02110-1301, USA.
 */
 /**
  * @file fs/gnunet-fs.c
@@ -55,7 +55,7 @@ static int verbose;
  * @return GNUNET_OK to continue iteration
  */
 static int
-print_indexed (void *cls, const char *filename, const GNUNET_HashCode * file_id)
+print_indexed (void *cls, const char *filename, const struct GNUNET_HashCode * file_id)
 {
   if (NULL == filename)
   {
@@ -119,10 +119,15 @@ main (int argc, char *const *argv)
     GNUNET_GETOPT_OPTION_VERBOSE (&verbose),
     GNUNET_GETOPT_OPTION_END
   };
-  return (GNUNET_OK ==
-          GNUNET_PROGRAM_run (argc, argv, "gnunet-fs [OPTIONS]",
-                              gettext_noop ("Special file-sharing operations"),
-                              options, &run, NULL)) ? ret : 1;
+
+  if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
+    return 2;
+  ret = (GNUNET_OK ==
+        GNUNET_PROGRAM_run (argc, argv, "gnunet-fs [OPTIONS]",
+                            gettext_noop ("Special file-sharing operations"),
+                            options, &run, NULL)) ? ret : 1;
+  GNUNET_free ((void*) argv);
+  return ret;
 }
 
 /* end of gnunet-fs.c */