mldonkey-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mldonkey-commits] Changes to mldonkey/src/utils/lib/unix32.ml


From: mldonkey-commits
Subject: [Mldonkey-commits] Changes to mldonkey/src/utils/lib/unix32.ml
Date: Fri, 02 Sep 2005 18:40:03 -0400

Index: mldonkey/src/utils/lib/unix32.ml
diff -u mldonkey/src/utils/lib/unix32.ml:1.38 
mldonkey/src/utils/lib/unix32.ml:1.39
--- mldonkey/src/utils/lib/unix32.ml:1.38       Mon Aug 29 14:54:59 2005
+++ mldonkey/src/utils/lib/unix32.ml    Fri Sep  2 22:39:59 2005
@@ -147,9 +147,9 @@
       Unix2.rename t.filename (Filename.concat f file);
       destroy t
 
-    let ftruncate64 t len =
+    let ftruncate64 t len sparse =
       check_destroyed t;
-      Unix2.c_ftruncate64 (local_force_fd t true) len
+      Unix2.c_ftruncate64 (local_force_fd t true) len sparse
 
     let getsize64 t writable =
       check_destroyed t;
@@ -221,7 +221,7 @@
       (Unix.file_descr -> int64 -> 'a) -> 'a
     val close : t -> unit
     val rename : t -> string -> unit
-    val ftruncate64 : t -> int64 -> unit
+    val ftruncate64 : t -> int64 -> bool -> unit
     val getsize64 : t -> bool -> int64
     val mtime64 : t -> float
     val exists : t -> bool
@@ -266,7 +266,7 @@
     Some fd -> fd
   | None ->
       let fd = FDCache.create zero_chunk_name in
-      FDCache.ftruncate64 fd zero_chunk_len;
+      FDCache.ftruncate64 fd zero_chunk_len false;
       zero_chunk_fd_option := Some fd;
       fd
 
@@ -453,7 +453,7 @@
       close t;
       List.iter (fun file -> FDCache.multi_rename file.fd f file.filename) 
t.files
 
-    let ftruncate64 t size =
+    let ftruncate64 t size sparse =
       t.size <- size
 
     let getsize64 t = t.size
@@ -782,7 +782,7 @@
       ) t.files
 *)
 
-    let ftruncate64 t size =
+    let ftruncate64 t size sparse =
       t.size <- size
 
     let getsize64 t writable = t.size
@@ -971,11 +971,11 @@
   create filename (fun f ->
       SparseFile (SparseFile.create f))
 
-let ftruncate64 t len =
+let ftruncate64 t len sparse =
   match t.file_kind with
-  | DiskFile t -> DiskFile.ftruncate64 t len
-  | MultiFile t -> MultiFile.ftruncate64 t len
-  | SparseFile t -> SparseFile.ftruncate64 t len
+  | DiskFile t -> DiskFile.ftruncate64 t len sparse
+  | MultiFile t -> MultiFile.ftruncate64 t len sparse
+  | SparseFile t -> SparseFile.ftruncate64 t len sparse
   | Destroyed -> failwith "Unix32.ftruncate64 on destroyed FD"
       
 let mtime64 t =
@@ -1389,8 +1389,8 @@
       
       iter t.file_parts
     
-    let ftruncate64 t len = 
-      ftruncate64 t.file len
+    let ftruncate64 t len sparse = 
+      ftruncate64 t.file len sparse
     
     let maxint64 = megabytes 1000000
     




reply via email to

[Prev in Thread] Current Thread [Next in Thread]