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.3.17~4 X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=commitdiff_plain;h=d12a702fe1898f3ea421210d92c705440efe07a8;hp=4412fd951ee7766ee9a70bf66b5cf11378a64ed0 Clarify sparse behaviour of truncate-size command. --- diff --git a/src/generator.ml b/src/generator.ml index 2209e68..99d80fb 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -3925,8 +3925,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 (