From c379757fae35ce991feff3324474056d7aa02d41 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Thu, 27 May 2010 10:25:18 +0100 Subject: [PATCH] Clarify sparse behaviour of truncate-size command. (cherry picked from commit d12a702fe1898f3ea421210d92c705440efe07a8) --- src/generator.ml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/generator.ml b/src/generator.ml index 861ad36..7744766 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -3911,8 +3911,13 @@ file must exist already."); "truncate a file to a particular size", "\ This command truncates C to size C bytes. The file -must exist already. If the file is smaller than C then -the file is extended to the required size with null bytes."); +must exist already. + +If the current file size is less than C then +the file is extended to the required size with zero bytes. +This creates a sparse file (ie. disk blocks are not allocated +for the file until you write to it). To create a non-sparse +file of zeroes, use C instead."); ("utimens", (RErr, [Pathname "path"; Int64 "atsecs"; Int64 "atnsecs"; Int64 "mtsecs"; Int64 "mtnsecs"]), 201, [], [InitBasicFS, Always, TestOutputStruct ( -- 1.8.3.1