[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r36582 - gnunet/src/hello
From: |
gnunet |
Subject: |
[GNUnet-SVN] r36582 - gnunet/src/hello |
Date: |
Mon, 26 Oct 2015 16:16:35 +0100 |
Author: grothoff
Date: 2015-10-26 16:16:35 +0100 (Mon, 26 Oct 2015)
New Revision: 36582
Modified:
gnunet/src/hello/gnunet-hello.c
Log:
-truncate on write
Modified: gnunet/src/hello/gnunet-hello.c
===================================================================
--- gnunet/src/hello/gnunet-hello.c 2015-10-26 14:48:56 UTC (rev 36581)
+++ gnunet/src/hello/gnunet-hello.c 2015-10-26 15:16:35 UTC (rev 36582)
@@ -27,7 +27,7 @@
#include "gnunet_hello_lib.h"
/**
- * Closure for 'add_to_buf'.
+ * Closure for #add_to_buf().
*/
struct AddContext
{
@@ -190,7 +190,7 @@
GNUNET_HELLO_is_friend_only (orig));
GNUNET_assert (NULL != result);
fh = GNUNET_DISK_file_open (argv[1],
- GNUNET_DISK_OPEN_WRITE,
+ GNUNET_DISK_OPEN_WRITE |
GNUNET_DISK_OPEN_TRUNCATE,
GNUNET_DISK_PERM_USER_READ |
GNUNET_DISK_PERM_USER_WRITE);
if (NULL == fh)
{
@@ -215,7 +215,10 @@
}
GNUNET_assert (GNUNET_OK == GNUNET_DISK_file_close (fh));
}
- FPRINTF (stderr, _("Modified %u addresses \n"), address_count);
+ FPRINTF (stderr,
+ _("Modified %u addresses, wrote %u bytes\n"),
+ address_count,
+ (unsigned int) fsize);
return 0;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r36582 - gnunet/src/hello,
gnunet <=