[Libguestfs] [PATCH] Replace shell_quote function with %Q and %R printf specifiers.
Richard W.M. Jones
rjones at redhat.com
Tue Jul 28 08:34:14 UTC 2009
On Mon, Jul 27, 2009 at 11:19:00PM +0100, Matthew Booth wrote:
> #define SYSROOT "/sysroot"
>
> snprintf (cmd, sizeof cmd, "cat " SYSROOT "%s", path);
This doesn't work because the path must be shell-quoted.
(Also SYSROOT is no longer a fixed string - but now a variable).
Rich.
--
Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 75 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