From ef2276654eae2e1bbcbcdb440a54029c12efccd0 Mon Sep 17 00:00:00 2001 From: Matthew Booth Date: Thu, 24 Jan 2013 15:21:14 +0000 Subject: [PATCH] generator: Create Mountable_or_Path, initially identical to Dev_or_Path --- generator/bindtests.ml | 2 +- generator/c.ml | 9 +++++---- generator/csharp.ml | 6 ++++-- generator/daemon.ml | 4 ++-- generator/erlang.ml | 5 +++-- generator/fish.ml | 11 ++++++----- generator/gobject.ml | 8 +++++--- generator/haskell.ml | 12 ++++++++---- generator/java.ml | 10 +++++----- generator/lua.ml | 9 ++++++--- generator/ocaml.ml | 8 +++++--- generator/perl.ml | 11 ++++++++--- generator/php.ml | 15 ++++++++++----- generator/python.ml | 18 ++++++++++++------ generator/ruby.ml | 6 ++++-- generator/tests_c_api.ml | 5 +++-- generator/types.ml | 1 + generator/utils.ml | 3 ++- generator/xdr.ml | 3 ++- 19 files changed, 92 insertions(+), 54 deletions(-) diff --git a/generator/bindtests.ml b/generator/bindtests.ml index 0ca5af910..4f9902118 100644 --- a/generator/bindtests.ml +++ b/generator/bindtests.ml @@ -127,7 +127,7 @@ print_strings (guestfs_h *g, char *const *argv) List.iter ( function | Pathname n - | Device n | Mountable n | Dev_or_Path n + | Device n | Mountable n | Dev_or_Path n | Mountable_or_Path n | String n | FileIn n | FileOut n diff --git a/generator/c.ml b/generator/c.ml index 386bbcd6d..a53332306 100644 --- a/generator/c.ml +++ b/generator/c.ml @@ -121,7 +121,7 @@ let rec generate_prototype ?(extern = true) ?(static = false) List.iter ( function | Pathname n - | Device n | Dev_or_Path n + | Device n | Dev_or_Path n | Mountable_or_Path n | String n | OptString n | Key n -> @@ -953,7 +953,7 @@ and generate_client_actions hash () = | Device n | Mountable n | Pathname n - | Dev_or_Path n + | Dev_or_Path n | Mountable_or_Path n | FileIn n | FileOut n | BufferIn n @@ -1071,7 +1071,7 @@ and generate_client_actions hash () = | Device n | Mountable n | Pathname n - | Dev_or_Path n + | Dev_or_Path n | Mountable_or_Path n | FileIn n | FileOut n -> (* guestfish doesn't support string escaping, so neither do we *) @@ -1385,7 +1385,8 @@ and generate_client_actions hash () = ) else ( List.iter ( function - | Pathname n | Device n | Mountable n | Dev_or_Path n | String n + | Pathname n | Device n | Mountable n | Dev_or_Path n + | Mountable_or_Path n | String n | Key n -> pr " args.%s = (char *) %s;\n" n n | OptString n -> diff --git a/generator/csharp.ml b/generator/csharp.ml index e2fcb425c..04ef94cec 100644 --- a/generator/csharp.ml +++ b/generator/csharp.ml @@ -187,7 +187,8 @@ namespace Guestfs (c_return_type ()) c_function; List.iter ( function - | Pathname n | Device n | Mountable n | Dev_or_Path n | String n + | Pathname n | Device n | Mountable n + | Dev_or_Path n | Mountable_or_Path n | String n | OptString n | FileIn n | FileOut n | Key n @@ -214,7 +215,8 @@ namespace Guestfs in List.iter ( function - | Pathname n | Device n | Mountable n | Dev_or_Path n | String n + | Pathname n | Device n | Mountable n + | Dev_or_Path n | Mountable_or_Path n | String n | OptString n | FileIn n | FileOut n | Key n diff --git a/generator/daemon.ml b/generator/daemon.ml index d81af9398..1d2f9fb52 100644 --- a/generator/daemon.ml +++ b/generator/daemon.ml @@ -112,7 +112,7 @@ and generate_daemon_actions () = pr " struct guestfs_%s_args args;\n" name; List.iter ( function - | Device n | Dev_or_Path n + | Device n | Dev_or_Path n | Mountable_or_Path n | Pathname n | String n | Key n @@ -214,7 +214,7 @@ and generate_daemon_actions () = | Mountable n -> pr " RESOLVE_MOUNTABLE(args.%s, %s, %s, goto done);\n" n n (if is_filein then "cancel_receive ()" else ""); - | Dev_or_Path n -> + | Dev_or_Path n | Mountable_or_Path n -> pr_args n; pr " REQUIRE_ROOT_OR_RESOLVE_DEVICE (%s, %s, goto done);\n" n (if is_filein then "cancel_receive ()" else ""); diff --git a/generator/erlang.ml b/generator/erlang.ml index 004aee40f..6242338df 100644 --- a/generator/erlang.ml +++ b/generator/erlang.ml @@ -293,7 +293,7 @@ extern void free_strings (char **r); fun i -> function | Pathname n - | Device n | Mountable n | Dev_or_Path n + | Device n | Mountable n | Dev_or_Path n | Mountable_or_Path n | String n | FileIn n | FileOut n @@ -386,7 +386,8 @@ extern void free_strings (char **r); (* Free strings if we copied them above. *) List.iter ( function - | Pathname n | Device n | Mountable n | Dev_or_Path n | String n + | Pathname n | Device n | Mountable n + | Dev_or_Path n | Mountable_or_Path n | String n | OptString n | FileIn n | FileOut n | Key n -> pr " free (%s);\n" n | StringList n | DeviceList n -> diff --git a/generator/fish.ml b/generator/fish.ml index eacca3720..f7661703b 100644 --- a/generator/fish.ml +++ b/generator/fish.ml @@ -328,7 +328,7 @@ Guestfish will prompt for these separately." | String n | OptString n -> pr " const char *%s;\n" n | Pathname n - | Dev_or_Path n + | Dev_or_Path n | Mountable_or_Path n | FileIn n | FileOut n | Key n -> pr " char *%s;\n" n @@ -411,7 +411,7 @@ Guestfish will prompt for these separately." | String name -> pr " %s = argv[i++];\n" name | Pathname name - | Dev_or_Path name -> + | Dev_or_Path name | Mountable_or_Path name -> pr " %s = win_prefix (argv[i++]); /* process \"win:\" prefix */\n" name; pr " if (%s == NULL) goto out_%s;\n" name name | OptString name -> @@ -625,8 +625,8 @@ Guestfish will prompt for these separately." | Bool name | Int name | Int64 name -> pr " out_%s:\n" name - | Pathname name | Dev_or_Path name | FileOut name - | Key name -> + | Pathname name | Dev_or_Path name | Mountable_or_Path name + | FileOut name | Key name -> pr " free (%s);\n" name; pr " out_%s:\n" name | FileIn name -> @@ -852,7 +852,8 @@ and generate_fish_actions_pod () = pr " %s" name; List.iter ( function - | Pathname n | Device n | Mountable n | Dev_or_Path n | String n -> + | Pathname n | Device n | Mountable n + | Dev_or_Path n | Mountable_or_Path n | String n -> pr " %s" n | OptString n -> pr " %s" n | StringList n | DeviceList n -> pr " '%s ...'" n diff --git a/generator/gobject.ml b/generator/gobject.ml index 5a36bfcf6..801ffb40f 100644 --- a/generator/gobject.ml +++ b/generator/gobject.ml @@ -77,7 +77,7 @@ let generate_gobject_proto name ?(single_line = true) | String n | Device n | Mountable n | Pathname n - | Dev_or_Path n + | Dev_or_Path n | Mountable_or_Path n | OptString n | Key n | FileIn n @@ -1033,7 +1033,8 @@ guestfs_session_close(GuestfsSession *session, GError **err) pr " (transfer none) (type utf8):" | OptString _ -> pr " (transfer none) (type utf8) (allow-none):" - | Device _ | Mountable _ | Pathname _ | Dev_or_Path _ + | Device _ | Mountable _ | Pathname _ + | Dev_or_Path _ | Mountable_or_Path _ | FileIn _ | FileOut _ -> pr " (transfer none) (type filename):" | StringList _ -> @@ -1185,7 +1186,8 @@ guestfs_session_close(GuestfsSession *session, GError **err) | BufferIn n -> pr "%s, %s_size" n n | Bool n | Int n | Int64 n | String n | Device n | Mountable n - | Pathname n | Dev_or_Path n | OptString n | StringList n + | Pathname n | Dev_or_Path n | Mountable_or_Path n + | OptString n | StringList n | DeviceList n | Key n | FileIn n | FileOut n -> pr "%s" n | Pointer _ -> diff --git a/generator/haskell.ml b/generator/haskell.ml index 2033dbff9..0bf855139 100644 --- a/generator/haskell.ml +++ b/generator/haskell.ml @@ -140,7 +140,8 @@ assocListOfHashtable (a:b:rest) = (a,b) : assocListOfHashtable rest function | FileIn n | FileOut n - | Pathname n | Device n | Mountable n | Dev_or_Path n | String n + | Pathname n | Device n | Mountable n + | Dev_or_Path n | Mountable_or_Path n | String n | Key n -> pr "withCString %s $ \\%s -> " n n | BufferIn n -> @@ -157,7 +158,8 @@ assocListOfHashtable (a:b:rest) = (a,b) : assocListOfHashtable rest | Int n -> sprintf "(fromIntegral %s)" n | Int64 n | Pointer (_, n) -> sprintf "(fromIntegral %s)" n | FileIn n | FileOut n - | Pathname n | Device n | Mountable n | Dev_or_Path n + | Pathname n | Device n | Mountable n + | Dev_or_Path n | Mountable_or_Path n | String n | OptString n | StringList n | DeviceList n | Key n -> n @@ -214,7 +216,8 @@ and generate_haskell_prototype ~handle ?(hs = false) (ret, args, optargs) = List.iter ( fun arg -> (match arg with - | Pathname _ | Device _ | Mountable _ | Dev_or_Path _ | String _ + | Pathname _ | Device _ | Mountable _ + | Dev_or_Path _ | Mountable_or_Path _ | String _ | Key _ -> pr "CString" | BufferIn _ -> @@ -256,7 +259,8 @@ and generate_haskell_prototype ~handle ?(hs = false) (ret, args, optargs) = List.iter ( fun arg -> (match arg with - | Pathname _ | Device _ | Mountable _ | Dev_or_Path _ | String _ + | Pathname _ | Device _ | Mountable _ + | Dev_or_Path _ | Mountable_or_Path _ | String _ | Key _ -> pr "String" | BufferIn _ -> diff --git a/generator/java.ml b/generator/java.ml index ad53ba3fd..660d37a52 100644 --- a/generator/java.ml +++ b/generator/java.ml @@ -463,7 +463,7 @@ and generate_java_prototype ?(public=false) ?(privat=false) ?(native=false) match arg with | Pathname n - | Device n | Mountable n | Dev_or_Path n + | Device n | Mountable n | Dev_or_Path n | Mountable_or_Path n | String n | OptString n | FileIn n @@ -798,7 +798,7 @@ get_all_event_callbacks (guestfs_h *g, size_t *len_rtn) List.iter ( function | Pathname n - | Device n | Mountable n | Dev_or_Path n + | Device n | Mountable n | Dev_or_Path n | Mountable_or_Path n | String n | OptString n | FileIn n @@ -867,7 +867,7 @@ get_all_event_callbacks (guestfs_h *g, size_t *len_rtn) List.iter ( function | Pathname n - | Device n | Mountable n | Dev_or_Path n + | Device n | Mountable n | Dev_or_Path n | Mountable_or_Path n | String n | OptString n | FileIn n @@ -924,7 +924,7 @@ get_all_event_callbacks (guestfs_h *g, size_t *len_rtn) List.iter ( function | Pathname n - | Device n | Mountable n | Dev_or_Path n + | Device n | Mountable n | Dev_or_Path n | Mountable_or_Path n | String n | FileIn n | FileOut n @@ -991,7 +991,7 @@ get_all_event_callbacks (guestfs_h *g, size_t *len_rtn) List.iter ( function | Pathname n - | Device n | Mountable n | Dev_or_Path n + | Device n | Mountable n | Dev_or_Path n | Mountable_or_Path n | String n | FileIn n | FileOut n diff --git a/generator/lua.ml b/generator/lua.ml index 04a3941cb..187884479 100644 --- a/generator/lua.ml +++ b/generator/lua.ml @@ -470,7 +470,8 @@ guestfs_lua_delete_event_callback (lua_State *L) List.iter ( function - | Pathname n | Device n | Mountable n | Dev_or_Path n | String n + | Pathname n | Device n | Mountable n + | Dev_or_Path n | Mountable_or_Path n | String n | FileIn n | FileOut n | Key n -> pr " const char *%s;\n" n | BufferIn n -> @@ -500,7 +501,8 @@ guestfs_lua_delete_event_callback (lua_State *L) fun i -> let i = i+2 in (* Lua indexes from 1(!), plus the handle. *) function - | Pathname n | Device n | Mountable n | Dev_or_Path n | String n + | Pathname n | Device n | Mountable n + | Dev_or_Path n | Mountable_or_Path n | String n | FileIn n | FileOut n | Key n -> pr " %s = luaL_checkstring (L, %d);\n" n i | BufferIn n -> @@ -560,7 +562,8 @@ guestfs_lua_delete_event_callback (lua_State *L) (* Free temporary data. *) List.iter ( function - | Pathname _ | Device _ | Mountable _ | Dev_or_Path _ | String _ + | Pathname _ | Device _ | Mountable _ + | Dev_or_Path _ | Mountable_or_Path _ | String _ | FileIn _ | FileOut _ | Key _ | BufferIn _ | OptString _ | Bool _ | Int _ | Int64 _ diff --git a/generator/ocaml.ml b/generator/ocaml.ml index 6302298ef..315d33da9 100644 --- a/generator/ocaml.ml +++ b/generator/ocaml.ml @@ -497,7 +497,7 @@ copy_table (char * const * argv) List.iter ( function | Pathname n - | Device n | Mountable n | Dev_or_Path n + | Device n | Mountable n | Dev_or_Path n | Mountable_or_Path n | String n | FileIn n | FileOut n @@ -583,7 +583,8 @@ copy_table (char * const * argv) (* Free strings if we copied them above. *) List.iter ( function - | Pathname n | Device n | Mountable n | Dev_or_Path n | String n + | Pathname n | Device n | Mountable n + | Dev_or_Path n | Mountable_or_Path n | String n | OptString n | FileIn n | FileOut n | BufferIn n | Key n -> pr " free (%s);\n" n | StringList n | DeviceList n -> @@ -712,7 +713,8 @@ and generate_ocaml_function_type ?(extra_unit = false) (ret, args, optargs) = ) optargs; List.iter ( function - | Pathname _ | Device _ | Mountable _ | Dev_or_Path _ | String _ + | Pathname _ | Device _ | Mountable _ + | Dev_or_Path _ | Mountable_or_Path _ | String _ | FileIn _ | FileOut _ | BufferIn _ | Key _ -> pr "string -> " | OptString _ -> pr "string option -> " | StringList _ | DeviceList _ -> pr "string array -> " diff --git a/generator/perl.ml b/generator/perl.ml index 3b4108a9c..bdfdb5b77 100644 --- a/generator/perl.ml +++ b/generator/perl.ml @@ -342,7 +342,8 @@ user_cancel (g) iteri ( fun i -> function - | Pathname n | Device n | Mountable n | Dev_or_Path n | String n + | Pathname n | Device n | Mountable n + | Dev_or_Path n | Mountable_or_Path n | String n | FileIn n | FileOut n | Key n -> pr " char *%s;\n" n | BufferIn n -> @@ -491,7 +492,8 @@ user_cancel (g) (* Cleanup any arguments. *) List.iter ( function - | Pathname _ | Device _ | Mountable _ | Dev_or_Path _ | String _ + | Pathname _ | Device _ | Mountable _ + | Dev_or_Path _ | Mountable_or_Path _ | String _ | OptString _ | Bool _ | Int _ | Int64 _ | FileIn _ | FileOut _ | BufferIn _ | Key _ | Pointer _ -> () @@ -922,6 +924,8 @@ handlers and threads. | Device n -> pr "[ '%s', 'string(device)', %d ]" n i | Mountable n -> pr "[ '%s', 'string(mountable)', %d ]" n i | Dev_or_Path n -> pr "[ '%s', 'string(dev_or_path)', %d ]" n i + | Mountable_or_Path n -> + pr "[ '%s', 'string(mountable_or_path)', %d ]" n i | String n -> pr "[ '%s', 'string', %d ]" n i | FileIn n -> pr "[ '%s', 'string(filename)', %d ]" n i | FileOut n -> pr "[ '%s', 'string(filename)', %d ]" n i @@ -1093,7 +1097,8 @@ and generate_perl_prototype name (ret, args, optargs) = if !comma then pr ", "; comma := true; match arg with - | Pathname n | Device n | Mountable n | Dev_or_Path n | String n + | Pathname n | Device n | Mountable n + | Dev_or_Path n | Mountable_or_Path n | String n | OptString n | Bool n | Int n | Int64 n | FileIn n | FileOut n | BufferIn n | Key n | Pointer (_, n) -> pr "$%s" n diff --git a/generator/php.ml b/generator/php.ml index cf2386384..a4c45361d 100644 --- a/generator/php.ml +++ b/generator/php.ml @@ -188,7 +188,8 @@ PHP_FUNCTION (guestfs_last_error) List.iter ( function - | String n | Device n | Mountable n | Pathname n | Dev_or_Path n + | String n | Device n | Mountable n | Pathname n + | Dev_or_Path n | Mountable_or_Path n | FileIn n | FileOut n | Key n | OptString n | BufferIn n -> @@ -232,7 +233,8 @@ PHP_FUNCTION (guestfs_last_error) let param_string = String.concat "" ( List.map ( function - | String n | Device n | Mountable n | Pathname n | Dev_or_Path n + | String n | Device n | Mountable n | Pathname n + | Dev_or_Path n | Mountable_or_Path n | FileIn n | FileOut n | BufferIn n | Key n -> "s" | OptString n -> "s!" | StringList n | DeviceList n -> "a" @@ -260,7 +262,8 @@ PHP_FUNCTION (guestfs_last_error) pr " &z_g"; List.iter ( function - | String n | Device n | Mountable n | Pathname n | Dev_or_Path n + | String n | Device n | Mountable n | Pathname n + | Dev_or_Path n | Mountable_or_Path n | FileIn n | FileOut n | BufferIn n | Key n | OptString n -> pr ", &%s, &%s_size" n n @@ -293,7 +296,8 @@ PHP_FUNCTION (guestfs_last_error) List.iter ( function - | String n | Device n | Mountable n | Pathname n | Dev_or_Path n + | String n | Device n | Mountable n | Pathname n + | Dev_or_Path n | Mountable_or_Path n | FileIn n | FileOut n | Key n | OptString n -> (* Just need to check the string doesn't contain any ASCII @@ -420,7 +424,8 @@ PHP_FUNCTION (guestfs_last_error) (* Free up parameters. *) List.iter ( function - | String n | Device n | Mountable n | Pathname n | Dev_or_Path n + | String n | Device n | Mountable n | Pathname n + | Dev_or_Path n | Mountable_or_Path n | FileIn n | FileOut n | Key n | OptString n -> () | BufferIn n -> () diff --git a/generator/python.ml b/generator/python.ml index cff304903..1b2e75595 100644 --- a/generator/python.ml +++ b/generator/python.ml @@ -289,7 +289,8 @@ free_strings (char **argv) List.iter ( function - | Pathname n | Device n | Mountable n | Dev_or_Path n | String n | Key n + | Pathname n | Device n | Mountable n + | Dev_or_Path n | Mountable_or_Path n | String n | Key n | FileIn n | FileOut n -> pr " const char *%s;\n" n | OptString n -> pr " const char *%s;\n" n @@ -326,7 +327,8 @@ free_strings (char **argv) pr " if (!PyArg_ParseTuple (args, (char *) \"O"; List.iter ( function - | Pathname _ | Device _ | Mountable _ | Dev_or_Path _ | String _ | Key _ + | Pathname _ | Device _ | Mountable _ + | Dev_or_Path _ | Mountable_or_Path _ | String _ | Key _ | FileIn _ | FileOut _ -> pr "s" | OptString _ -> pr "z" | StringList _ | DeviceList _ -> pr "O" @@ -347,7 +349,8 @@ free_strings (char **argv) pr " &py_g"; List.iter ( function - | Pathname n | Device n | Mountable n | Dev_or_Path n | String n | Key n + | Pathname n | Device n | Mountable n + | Dev_or_Path n | Mountable_or_Path n | String n | Key n | FileIn n | FileOut n -> pr ", &%s" n | OptString n -> pr ", &%s" n | StringList n | DeviceList n -> pr ", &py_%s" n @@ -369,7 +372,8 @@ free_strings (char **argv) pr " g = get_handle (py_g);\n"; List.iter ( function - | Pathname _ | Device _ | Mountable _ | Dev_or_Path _ | String _ | Key _ + | Pathname _ | Device _ | Mountable _ + | Dev_or_Path _ | Mountable_or_Path _ | String _ | Key _ | FileIn _ | FileOut _ | OptString _ | Bool _ | Int _ | Int64 _ | BufferIn _ -> () | StringList n | DeviceList n -> @@ -505,7 +509,8 @@ free_strings (char **argv) List.iter ( function - | Pathname _ | Device _ | Mountable _ | Dev_or_Path _ | String _ | Key _ + | Pathname _ | Device _ | Mountable _ + | Dev_or_Path _ | Mountable_or_Path _ | String _ | Key _ | FileIn _ | FileOut _ | OptString _ | Bool _ | Int _ | Int64 _ | BufferIn _ | Pointer _ -> () | StringList n | DeviceList n -> @@ -773,7 +778,8 @@ class GuestFS(object): *) List.iter ( function - | Pathname _ | Device _ | Mountable _ | Dev_or_Path _ | String _ | Key _ + | Pathname _ | Device _ | Mountable _ + | Dev_or_Path _ | Mountable_or_Path _ | String _ | Key _ | FileIn _ | FileOut _ | OptString _ | Bool _ | Int _ | Int64 _ | BufferIn _ | Pointer _ -> () | StringList n | DeviceList n -> diff --git a/generator/ruby.ml b/generator/ruby.ml index b98c7ff51..4f2c60bb2 100644 --- a/generator/ruby.ml +++ b/generator/ruby.ml @@ -505,7 +505,8 @@ ruby_user_cancel (VALUE gv) List.iter ( function - | Pathname n | Device n | Mountable n | Dev_or_Path n | String n | Key n + | Pathname n | Device n | Mountable n + | Dev_or_Path n | Mountable_or_Path n | String n | Key n | FileIn n | FileOut n -> pr " const char *%s = StringValueCStr (%sv);\n" n n; | BufferIn n -> @@ -607,7 +608,8 @@ ruby_user_cancel (VALUE gv) List.iter ( function - | Pathname _ | Device _ | Mountable _ | Dev_or_Path _ | String _ | Key _ + | Pathname _ | Device _ | Mountable _ + | Dev_or_Path _ | Mountable_or_Path _ | String _ | Key _ | FileIn _ | FileOut _ | OptString _ | Bool _ | Int _ | Int64 _ | BufferIn _ | Pointer _ -> () | StringList n | DeviceList n -> diff --git a/generator/tests_c_api.ml b/generator/tests_c_api.ml index 701b766c1..9d0d24418 100644 --- a/generator/tests_c_api.ml +++ b/generator/tests_c_api.ml @@ -785,7 +785,7 @@ and generate_test_command_call ?(expect_error = false) ?test test_name cmd = | Pathname n, arg | Device n, arg | Mountable n, arg - | Dev_or_Path n, arg + | Dev_or_Path n, arg | Mountable_or_Path n, arg | String n, arg | OptString n, arg | Key n, arg -> @@ -894,7 +894,8 @@ and generate_test_command_call ?(expect_error = false) ?test test_name cmd = function | OptString _, "NULL" -> pr ", NULL" | Pathname n, _ - | Device n, _ | Mountable n, _ | Dev_or_Path n, _ + | Device n, _ | Mountable n, _ + | Dev_or_Path n, _ | Mountable_or_Path n, _ | String n, _ | OptString n, _ | Key n, _ -> diff --git a/generator/types.ml b/generator/types.ml index d9287248f..0198eace7 100644 --- a/generator/types.ml +++ b/generator/types.ml @@ -135,6 +135,7 @@ and argt = | Mountable of string (* location of mountable filesystem, cannot be NULL *) | Pathname of string (* file name, cannot be NULL *) | Dev_or_Path of string (* /dev device name or Pathname, cannot be NULL *) + | Mountable_or_Path of string (* mount or Pathname, cannot be NULL *) | OptString of string (* const char *name, may be NULL *) | StringList of string(* list of strings (each string cannot be NULL) *) | DeviceList of string(* list of Device names (each cannot be NULL) *) diff --git a/generator/utils.ml b/generator/utils.ml index 6a9400946..6bc039f50 100644 --- a/generator/utils.ml +++ b/generator/utils.ml @@ -250,7 +250,8 @@ let map_chars f str = List.map f (explode str) let name_of_argt = function - | Pathname n | Device n | Mountable n | Dev_or_Path n | String n | OptString n + | Pathname n | Device n | Mountable n | Dev_or_Path n + | Mountable_or_Path n | String n | OptString n | StringList n | DeviceList n | Bool n | Int n | Int64 n | FileIn n | FileOut n | BufferIn n | Key n | Pointer (_, n) -> n diff --git a/generator/xdr.ml b/generator/xdr.ml index 976a9582e..e2161cdd1 100644 --- a/generator/xdr.ml +++ b/generator/xdr.ml @@ -106,7 +106,8 @@ let generate_xdr () = pr "struct %s_args {\n" name; List.iter ( function - | Pathname n | Device n | Mountable n | Dev_or_Path n | String n + | Pathname n | Device n | Mountable n | Dev_or_Path n + | Mountable_or_Path n | String n | Key n -> pr " string %s<>;\n" n | OptString n -> pr " guestfs_str *%s;\n" n