[Libguestfs] [PATCH 01/10] Rearrange qemu command line order (no functional change).
Richard W.M. Jones
rjones at redhat.com
Mon Sep 21 16:14:49 UTC 2009
On Mon, Sep 21, 2009 at 05:50:18PM +0200, Jim Meyering wrote:
> Richard W.M. Jones wrote:
> > From: Richard Jones <rjones at trick.home.annexia.org>
> ...
>
> Looks fine.
>
> > + snprintf (append, sizeof append,
> > + LINUX_CMDLINE
> > + "%s" /* (selinux) */
> > + "%s" /* (verbose) */
> > + "%s", /* (append) */
> > + g->selinux ? "selinux=1 enforcing=0 " : "selinux=0 ",
> > + g->verbose ? "guestfs_verbose=1 " : " ",
> > + g->append ? g->append : "");
>
> You might prefer (more maintainable/readable) if the separating spaces
> were pulled "up" into the format string:
>
> snprintf (append, sizeof append,
> LINUX_CMDLINE
> "%s " /* (selinux) */
> "%s " /* (verbose) */
> "%s", /* (append) */
> g->selinux ? "selinux=1 enforcing=0" : "selinux=0",
> g->verbose ? "guestfs_verbose=1" : "",
> g->append ? g->append : "");
I will have a think if there's a clearer way to do this, including
handling the contents of LINUX_CMDLINE which is also space-separated.
Thanks for looking at these patches.
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