From: Richard Jones Date: Thu, 27 May 2010 09:25:18 +0000 (+0100) Subject: Clarify sparse behaviour of truncate-size command. X-Git-Tag: 1.2.9~17 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=c379757fae35ce991feff3324474056d7aa02d41;p=libguestfs.git Clarify sparse behaviour of truncate-size command. (cherry picked from commit d12a702fe1898f3ea421210d92c705440efe07a8) --- 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 (