[Libguestfs] [PATCH V5] NEW API: add new api xfs_info

Richard W.M. Jones rjones at redhat.com
Tue Jul 17 17:22:18 UTC 2012


You must enable warnings (./configure --enable-gcc-warnings)
and fix all the problems that gcc finds:

xfs.c:33:1: error: no previous prototype for 'optgroup_xfs_available' [-Werror=missing-prototypes]
xfs.c: In function 'parse_xfs_info':
xfs.c:97:5: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
xfs.c:101:5: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
xfs.c:108:5: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
xfs.c:115:5: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
xfs.c:122:5: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
xfs.c:135:5: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
xfs.c:142:5: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
xfs.c:159:5: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
xfs.c:176:5: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
xfs.c:183:5: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
xfs.c:196:5: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
xfs.c:203:5: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
xfs.c:210:5: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
make[4]: Entering directory `/home/rjones/d/libguestfs/src'
xfs.c:213:7: error: pointer targets in passing argument 1 of 'parse_uint32' differ in signedness [-Werror=pointer-sign]make -C ../generator stamp-generator
xfs.c:56:1: note: expected 'uint32_t *' but argument is of type 'int *'
xfs.c:217:5: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
xfs.c:221:5: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]make[4]: Entering directory `/home/rjones/d/libguestfs/src'
xfs.c:228:5: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
xfs.c:235:5: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
xfs.c:239:5: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
cc1: all warnings being treated as errors
make[3]: *** [guestfsd-xfs.o] Error 1

Secondly you have to create the xfs optional group:

    proc_nr = Some 337;
    optional = Some "xfs";
    tests = [

I couldn't test it any further because the warning-as-errors above
stop me from compiling it.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora




More information about the Libguestfs mailing list