fb0576afb5
ok ajacoutot@
31 lines
1.1 KiB
Plaintext
31 lines
1.1 KiB
Plaintext
$OpenBSD: patch-src_filesystem_e2_fs_c,v 1.4 2009/08/17 12:14:52 giovanni Exp $
|
|
--- src/filesystem/e2_fs.c.orig Sat Jun 13 00:50:49 2009
|
|
+++ src/filesystem/e2_fs.c Fri Aug 14 10:52:08 2009
|
|
@@ -58,7 +58,7 @@ Not implemented yet.
|
|
#ifdef E2_VFS
|
|
#include "e2_plugins.h"
|
|
#endif
|
|
-#if defined(__linux__) || defined(__FreeBSD__)
|
|
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
|
#include "e2_complete.h"
|
|
#endif
|
|
|
|
@@ -2570,7 +2570,7 @@ is needed
|
|
gint e2_fs_writeflush (gint file_desc)
|
|
{
|
|
gint res;
|
|
- res = fdatasync (file_desc);
|
|
+ res = fsync (file_desc);
|
|
if (res == -1 && errno == EINVAL)
|
|
res = 0;
|
|
return res;
|
|
@@ -2645,7 +2645,7 @@ gboolean e2_fs_copy_file (VPATH *src, const struct sta
|
|
// blksize_t buf_size = 1048576;
|
|
//find a buffer up to 16 times dest block
|
|
//(compromise between accesses and multi-tasking latency)
|
|
- blksize_t buf_size = dest_sb.st_blksize * 16;
|
|
+ size_t buf_size = dest_sb.st_blksize * 16;
|
|
size_t src_size = src_sb->st_size * 2;
|
|
while (buf_size > src_size && buf_size > dest_sb.st_blksize)
|
|
buf_size /= 2;
|