Files
libguestfs/df
Richard W.M. Jones 5bf7f770b6 When calling getline first time, initialize length to zero.
The man page for getline says:

   ssize_t getline(char **lineptr, size_t *n, FILE *stream);
 [...]
   If  *lineptr  is set to NULL and *n is set 0 before the call, then get‐
   line() will allocate a buffer for storing the line.  This buffer should
   be freed by the user program even if getline() failed.

which seems to indicate that we must initialize both line and len to 0
before the first call to getline.

In several places we were not initializing len.  The program still
worked fine, but it seems better to initialize the length anyway.
2015-05-14 13:22:00 +01:00
..
2014-12-11 14:15:00 +00:00
2015-02-14 18:46:04 +00:00
2015-01-17 09:08:15 +00:00
2015-02-14 18:46:04 +00:00
2015-02-14 18:46:04 +00:00
2010-11-25 18:58:13 +00:00
2015-01-17 09:08:15 +00:00
2015-01-17 09:08:15 +00:00

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]'.