Commit Graph

12 Commits

Author SHA1 Message Date
Richard W.M. Jones
275b5fa560 fish: Change 'int argc' to 'size_t argc' throughout.
Cherry picked from commit 6391d1a7cf
and backported to stable-1.2 branch.
2010-10-23 13:01:29 +01:00
Richard Jones
d5f98968a4 Check error returns from posix_fallocate (RHBZ#579664).
posix_fallocate has a non-standard way to return error indications.
Thus all our calls to posix_fallocate were effectively unchecked.  For
example:

  $ guestfish alloc test.img 1P
  $ echo $?
  0
  $ ll test.img
  -rw-rw-r--. 1 rjones rjones 0 2010-04-06 11:02 test.img
  $ rm test.img

With this change, errors are detected and reported properly:

  $ ./fish/guestfish alloc test.img 1P
  fallocate: File too large

This is a fix for:
https://bugzilla.redhat.com/show_bug.cgi?id=579664
(cherry picked from commit 2ade61d1f8)
2010-04-08 22:21:20 +01:00
Richard Jones
5ebf3a3934 Mac OS X: provide alternate implementation of posix_fallocate. 2010-03-22 10:41:45 +00:00
Richard W.M. Jones
e1f5472395 Fixes for compiling on 32 bit. 2009-11-06 09:14:55 +00:00
Richard Jones
857954dfbd fish: Allow <nn>P and <nn>E for petabyte and exabyte allocations. 2009-11-04 21:51:35 +00:00
Richard Jones
3266e51054 fish: Allow <nn>T for terabyte allocations. 2009-11-04 18:03:58 +00:00
Richard Jones
5ce72e039c fish: New command 'sparse', like 'alloc' but to generate sparse files.
With sparse you can make sparse files, which is fun because you
can experiment with really large devices:

  ><fs> sparse /tmp/test.img 100G
  ><fs> run
  ><fs> sfdiskM /dev/vda ,
  ><fs> mkfs ext2 /dev/vda1    # very long pause here ...
  ><fs> mount /dev/vda1 /

To see the real (ie. allocated) size of the sparse file, use the du
command, eg:

  ><fs> !du -h /tmp/test.img
  1.6G -rw-rw-r-- 1 rjones rjones 100G 2009-11-04 17:40 /tmp/test.img
2009-11-04 17:42:03 +00:00
Jim Meyering
a7b73d4a1e remove trailing blanks 2009-07-03 17:04:21 +02:00
Richard Jones
d70248333e Gettextize the source, make library strings translatable. 2009-05-21 12:01:36 +01:00
Richard Jones
c10fa84ada Implement -command (to ignore errors) in guestfish, and allow recovery from qemu process failure. 2009-05-08 15:19:51 +01:00
Richard Jones
05712b2457 'guestfish edit' commands and several bugfixes. 2009-04-15 23:54:51 +01:00
Richard Jones
612a358b89 Move guestfish 'alloc' command to a separate file. 2009-04-15 20:27:30 +01:00