summaryrefslogtreecommitdiffstats
path: root/tools/make-test-img.sh
Commit message (Collapse)AuthorAgeFilesLines
* New API: write for creating files with fixed content (RHBZ#501889).Richard Jones2010-05-201-6/+6
| | | | | | | | | | | | | The guestfs_write call can be used to create small files with arbitrary 8 bit content, including \0 bytes. This replaces and deprecates write-file, which cannot be modified to use BufferIn because of an unfortunate choice in the ABI: the size parameter to write-file, if zero, means that the daemon tries to calculate the length of the buffer using strlen. However this fails if we pass a zero-length buffer using BufferIn because then the daemon tries to do strlen on a (really) zero length buffer, not even containing a terminating \0 character, thus segfaulting.
* virt-df: Match output with native (coreutils) 'df' command (RHBZ#578123).Richard Jones2010-03-301-5/+6
| | | | | | | | | | | | | | | | | | | | This commit fixes the 'Use%' field in the output so it matches what coreutils' 'df' command would print. Firstly we change the calculation to use the space available to root, not the space available to non-root. This means it matches what 'df' when run as root in the guest would show. Secondly we display this rounded up to the next whole percent (ie. using ceil), which is also what 'df' does. Thirdly we change the regression test so it tests this. Note that even with these changes you are not guaranteed to get precisely the same figures from inside and outside the guest, as it depends on how quiescent the guest is and how recently the superblock was synced. Thanks: Rita Wu
* tools: Add basic tests for the virt-* tools.Richard Jones2010-03-301-0/+88