[Libguestfs] [PATCH libguestfs 01/23] generator.ml: define new String-like type: "Device"

Richard W.M. Jones rjones at redhat.com
Wed Aug 12 17:31:50 UTC 2009


On Wed, Aug 12, 2009 at 06:52:37PM +0200, Jim Meyering wrote:
> @@ -4474,7 +4475,8 @@ check_state (guestfs_h *g, const char *caller)
>         | args ->
>             List.iter (
>               function
> -             | String n ->
> +	     (* FIXME *)
> +             | Device n | String n ->
>                   pr "  args.%s = (char *) %s;\n" n n
>               | OptString n ->
>                   pr "  args.%s = %s ? (char **) &%s : NULL;\n" n n n

What was the FIXME here?  Looks OK to me.

> @@ -4683,7 +4685,8 @@ and generate_daemon_actions () =
>                  * allow device name translation.  This is safe because
>                  * we can modify the string (passed from RPC).
>                  *)
> -             | String n
> +	       (* FIXME *)
> +             | Device n | String n
>               | OptString n -> pr "  char *%s;\n" n
>               | StringList n -> pr "  char **%s;\n" n
>               | Bool n -> pr "  int %s;\n" n

And here?  I guess doing device name translation?

> @@ -6222,9 +6228,11 @@ and generate_prototype ?(extern = true) ?(static = false) ?(semicolon = true)
>      in
>      List.iter (
>        function
> +      | Device n
>        | String n
>        | OptString n ->
>            next ();
> +(* FIXME *)
>            if not in_daemon then pr "const char *%s" n
>            else pr "char *%s" n
>        | StringList n ->

Also unclear what the FIXME is here?

- - -

Anyway, the patch looks fine to me.  ACK.

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
New in Fedora 11: Fedora Windows cross-compiler. Compile Windows
programs, test, and build Windows installers. Over 70 libraries supprt'd
http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw




More information about the Libguestfs mailing list