[Libguestfs] [PATCH 2/3] New API: find0 (unlimited version of find)

Richard W.M. Jones rjones at redhat.com
Mon Oct 19 18:17:54 UTC 2009


On Mon, Oct 19, 2009 at 06:24:02PM +0100, Richard W.M. Jones wrote:
> +/* The code below assumes each path returned can fit into a protocol
> + * chunk.  If this turns out not to be true at some point in the
> + * future then we'll need to modify the code a bit to handle it, or
> + * make the chunk size a bit bigger.
> + */

Actually the comment is wrong: we CAN'T change the chunk size because
it's baked into the protocol which we can't change.  Instead we'd have
to change the code to split the path over two or more chunks.

> +  sysrootdir = sysroot_path (dir);

Grrrr ... the code misses a free (sysrootdir) along the non-error
path.

Garbage collection FTW.

Rest looks OK, but when reviewing please imagine that the above two
bugs are fixed.

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