aboutsummaryrefslogtreecommitdiff
path: root/src/fs
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-02-05 08:37:13 +0000
committerChristian Grothoff <christian@grothoff.org>2012-02-05 08:37:13 +0000
commitb393537f38727987db955152cc34d69f4fb4173b (patch)
tree3554fe35120fbf080685ed03450425f319b98b12 /src/fs
parent8fd8fedc315fabc3560dc2e1028378d89295147a (diff)
downloadgnunet-b393537f38727987db955152cc34d69f4fb4173b.tar.gz
gnunet-b393537f38727987db955152cc34d69f4fb4173b.zip
-eliminate printing warning on MAGIC missmatch (#2138)
Diffstat (limited to 'src/fs')
-rw-r--r--src/fs/fs_directory.c4
-rw-r--r--src/fs/gnunet-directory.c7
2 files changed, 5 insertions, 6 deletions
diff --git a/src/fs/fs_directory.c b/src/fs/fs_directory.c
index d5f73623a..b26ec12d3 100644
--- a/src/fs/fs_directory.c
+++ b/src/fs/fs_directory.c
@@ -197,11 +197,7 @@ GNUNET_FS_directory_list_contents (size_t size, const void *data,
197 if ((offset == 0) && 197 if ((offset == 0) &&
198 ((size < 8 + sizeof (uint32_t)) || 198 ((size < 8 + sizeof (uint32_t)) ||
199 (0 != memcmp (cdata, GNUNET_FS_DIRECTORY_MAGIC, 8)))) 199 (0 != memcmp (cdata, GNUNET_FS_DIRECTORY_MAGIC, 8))))
200 {
201 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
202 _("MAGIC mismatch. This is not a GNUnet directory.\n"));
203 return GNUNET_SYSERR; 200 return GNUNET_SYSERR;
204 }
205 pos = offset; 201 pos = offset;
206 if (offset == 0) 202 if (offset == 0)
207 { 203 {
diff --git a/src/fs/gnunet-directory.c b/src/fs/gnunet-directory.c
index adb071e8d..a853e8899 100644
--- a/src/fs/gnunet-directory.c
+++ b/src/fs/gnunet-directory.c
@@ -150,8 +150,11 @@ run (void *cls, char *const *args, const char *cfgfile,
150 len = (size_t) size; 150 len = (size_t) size;
151 data = GNUNET_DISK_file_map (h, &map, GNUNET_DISK_MAP_TYPE_READ, len); 151 data = GNUNET_DISK_file_map (h, &map, GNUNET_DISK_MAP_TYPE_READ, len);
152 GNUNET_assert (NULL != data); 152 GNUNET_assert (NULL != data);
153 GNUNET_FS_directory_list_contents (len, data, 0, &print_entry, NULL); 153 if (GNUNET_OK != GNUNET_FS_directory_list_contents (len, data, 0, &print_entry, NULL))
154 printf ("\n"); 154 fprintf (stdout, _("`%s' is not a GNUnet directory\n"),
155 filename);
156 else
157 printf ("\n");
155 GNUNET_DISK_file_unmap (map); 158 GNUNET_DISK_file_unmap (map);
156 GNUNET_DISK_file_close (h); 159 GNUNET_DISK_file_close (h);
157 } 160 }