mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
Rename guestfs_safe_malloc et al to guestfs___safe_malloc etc. To use the private functions, code now has to define -DGUESTFS_PRIVATE_FUNCTIONS=1. This will make it easier for us in future to work out which programs are using these functions and to minimize both the number of programs and the functions they are calling. Note that the Perl, Python, OCaml, Ruby and Java bindings use guestfs_safe_* calls. None of the other bindings do. This is a bug (in the bindings using those functions): these functions will call the out of memory callback on failure. This function defaults to abort(), and since this happens from a language binding, there is no way to change this default.
This is the third rewrite of the virt-df program. It very much
follows the outline of the Perl program which this replaced in
libguestfs 1.7.14.
main.c - main program
domains.c - dealing with libvirt, only used if libvirt is around
at compile time
df.c - getting the stats from libguestfs
output.c - writing the output, CSV output
virt-df.h - header file
Note this also uses the shared options parsing code in
'fish/options.[ch]'.