#include "gnunet_os_lib.h"
#include <gcrypt.h>
+#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
+
+#define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util", syscall)
+
/**
* Create a cryptographically weak pseudo-random number in the interval of 0 to 1.
*
if (genproc != NULL)
{
if (0 != GNUNET_OS_process_kill (genproc, SIGTERM))
- GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "kill");
+ LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "kill");
GNUNET_break (GNUNET_OK == GNUNET_OS_process_wait (genproc));
GNUNET_OS_process_close (genproc);
genproc = NULL;
return;
}
if (0 != GNUNET_OS_process_kill (genproc, SIGTERM))
- GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "kill");
+ LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "kill");
GNUNET_break (GNUNET_OK == GNUNET_OS_process_wait (genproc));
GNUNET_OS_process_close (genproc);
genproc = NULL;
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- _("Starting `%s' process to generate entropy\n"), "find");
+ LOG (GNUNET_ERROR_TYPE_INFO, _("Starting `%s' process to generate entropy\n"),
+ "find");
genproc =
GNUNET_OS_start_process (NULL, NULL, "sh", "sh", "-c",
"exec find / -mount -type f -exec cp {} /dev/null \\; 2>/dev/null",
_
("libgcrypt has not the expected version (version %s is required).\n"),
GCRYPT_VERSION);
- abort ();
+ GNUNET_abort ();
}
#ifdef gcry_fast_random_poll
gcry_fast_random_poll ();