+ if optargs <> [] then (
+ let uc_name = String.uppercase name in
+ List.iter (
+ fun argt ->
+ let n = name_of_argt argt in
+ let uc_n = String.uppercase n in
+ pr " if (optargs_t_%s != " n;
+ (match argt with
+ | Bool _ | Int _ | Int64 _ -> pr "-1"
+ | String _ -> pr "NULL"
+ | _ -> assert false
+ );
+ pr ") {\n";
+ pr " optargs_s.%s = optargs_t_%s;\n" n n;
+ pr " optargs_s.bitmask |= GUESTFS_%s_%s_BITMASK;\n" uc_name uc_n;
+ pr " }\n"
+ ) optargs;
+ pr "\n"
+ );
+
+ if optargs = [] then
+ pr " r = guestfs_%s " name
+ else
+ pr " r = guestfs_%s_argv " name;