diff options
author | Richard Jones <rjones@redhat.com> | 2010-05-27 10:25:18 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2010-05-27 10:25:18 +0100 |
commit | d12a702fe1898f3ea421210d92c705440efe07a8 (patch) | |
tree | 963c0e8667890127eb7e78dd15615ea7e52fd3e1 | |
parent | 4412fd951ee7766ee9a70bf66b5cf11378a64ed0 (diff) | |
download | libguestfs-d12a702fe1898f3ea421210d92c705440efe07a8.tar.gz libguestfs-d12a702fe1898f3ea421210d92c705440efe07a8.tar.xz libguestfs-d12a702fe1898f3ea421210d92c705440efe07a8.zip |
Clarify sparse behaviour of truncate-size command.
-rwxr-xr-x | src/generator.ml | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/generator.ml b/src/generator.ml index 2209e68b..99d80fb1 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<path> to size C<size> bytes. The file -must exist already. If the file is smaller than C<size> then -the file is extended to the required size with null bytes."); +must exist already. + +If the current file size is less than C<size> 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<guestfs_fallocate64> instead."); ("utimens", (RErr, [Pathname "path"; Int64 "atsecs"; Int64 "atnsecs"; Int64 "mtsecs"; Int64 "mtnsecs"]), 201, [], [InitBasicFS, Always, TestOutputStruct ( |