aboutsummaryrefslogtreecommitdiff
path: root/src/util/disk.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/disk.c')
-rw-r--r--src/util/disk.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/util/disk.c b/src/util/disk.c
index d349aeb8e..69473a13d 100644
--- a/src/util/disk.c
+++ b/src/util/disk.c
@@ -410,7 +410,7 @@ mktemp_name (const char *t)
410 if (NULL == tmpdir) 410 if (NULL == tmpdir)
411 tmpdir = getenv ("TMP"); 411 tmpdir = getenv ("TMP");
412 if (NULL == tmpdir) 412 if (NULL == tmpdir)
413 tmpdir = getenv ("TEMP"); 413 tmpdir = getenv ("TEMP");
414 if (NULL == tmpdir) 414 if (NULL == tmpdir)
415 tmpdir = "/tmp"; 415 tmpdir = "/tmp";
416 GNUNET_asprintf (&tmpl, "%s/%s%s", tmpdir, t, "XXXXXX"); 416 GNUNET_asprintf (&tmpl, "%s/%s%s", tmpdir, t, "XXXXXX");
@@ -522,7 +522,7 @@ GNUNET_DISK_file_backup (const char *fil)
522 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, 522 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
523 "rename", 523 "rename",
524 fil); 524 fil);
525 GNUNET_free (target); 525 GNUNET_free (target);
526} 526}
527 527
528 528
@@ -795,7 +795,7 @@ GNUNET_DISK_directory_create_for_file (const char *filename)
795 * @return the number of bytes read on success, #GNUNET_SYSERR on failure 795 * @return the number of bytes read on success, #GNUNET_SYSERR on failure
796 */ 796 */
797ssize_t 797ssize_t
798GNUNET_DISK_file_read (const struct GNUNET_DISK_FileHandle *h, 798GNUNET_DISK_file_read (const struct GNUNET_DISK_FileHandle *h,
799 void *result, 799 void *result,
800 size_t len) 800 size_t len)
801{ 801{
@@ -850,7 +850,7 @@ GNUNET_DISK_file_read (const struct GNUNET_DISK_FileHandle *h,
850 */ 850 */
851ssize_t 851ssize_t
852GNUNET_DISK_file_read_non_blocking (const struct GNUNET_DISK_FileHandle *h, 852GNUNET_DISK_file_read_non_blocking (const struct GNUNET_DISK_FileHandle *h,
853 void *result, 853 void *result,
854 size_t len) 854 size_t len)
855{ 855{
856 if (NULL == h) 856 if (NULL == h)
@@ -921,8 +921,8 @@ GNUNET_DISK_file_read_non_blocking (const struct GNUNET_DISK_FileHandle *h,
921 * @return number of bytes read, #GNUNET_SYSERR on failure 921 * @return number of bytes read, #GNUNET_SYSERR on failure
922 */ 922 */
923ssize_t 923ssize_t
924GNUNET_DISK_fn_read (const char *fn, 924GNUNET_DISK_fn_read (const char *fn,
925 void *result, 925 void *result,
926 size_t len) 926 size_t len)
927{ 927{
928 struct GNUNET_DISK_FileHandle *fh; 928 struct GNUNET_DISK_FileHandle *fh;
@@ -1033,7 +1033,7 @@ GNUNET_DISK_file_write (const struct GNUNET_DISK_FileHandle * h,
1033 */ 1033 */
1034ssize_t 1034ssize_t
1035GNUNET_DISK_file_write_blocking (const struct GNUNET_DISK_FileHandle * h, 1035GNUNET_DISK_file_write_blocking (const struct GNUNET_DISK_FileHandle * h,
1036 const void *buffer, 1036 const void *buffer,
1037 size_t n) 1037 size_t n)
1038{ 1038{
1039 if (NULL == h) 1039 if (NULL == h)
@@ -1152,7 +1152,7 @@ GNUNET_DISK_directory_scan (const char *dir_name,
1152 } 1152 }
1153 if (!S_ISDIR (istat.st_mode)) 1153 if (!S_ISDIR (istat.st_mode))
1154 { 1154 {
1155 LOG (GNUNET_ERROR_TYPE_WARNING, 1155 LOG (GNUNET_ERROR_TYPE_WARNING,
1156 _("Expected `%s' to be a directory!\n"), 1156 _("Expected `%s' to be a directory!\n"),
1157 dir_name); 1157 dir_name);
1158 GNUNET_free (dname); 1158 GNUNET_free (dname);
@@ -1413,7 +1413,7 @@ GNUNET_DISK_directory_remove (const char *filename)
1413 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 1413 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
1414 */ 1414 */
1415int 1415int
1416GNUNET_DISK_file_copy (const char *src, 1416GNUNET_DISK_file_copy (const char *src,
1417 const char *dst) 1417 const char *dst)
1418{ 1418{
1419 char *buf; 1419 char *buf;
@@ -1684,7 +1684,7 @@ GNUNET_DISK_file_open (const char *fn,
1684 mode = translate_unix_perms (perm); 1684 mode = translate_unix_perms (perm);
1685 } 1685 }
1686 1686
1687 fd = open (expfn, oflags 1687 fd = open (expfn, oflags
1688#if O_CLOEXEC 1688#if O_CLOEXEC
1689 | O_CLOEXEC 1689 | O_CLOEXEC
1690#endif 1690#endif