search for: stringlist

Displaying 20 results from an estimated 261 matches for "stringlist".

2015 Oct 20
3
[PATCH 1/2] generator: add a RelativePathnameList parameter type
Mostly like StringList (so it can used in current StringList parameters), but checking client- and daemon-side that the elements are relative paths. --- generator/bindtests.ml | 3 ++- generator/c.ml | 29 ++++++++++++++++++++++++----- generator/csharp.ml | 4 ++-- generator/daemon.ml | 20 ++++++...
2015 Oct 21
2
[PATCH 1/2] generator: add a FilenameList parameter type
Mostly like StringList (so it can used in current StringList parameters), but checking client- and daemon-side that the elements are file names. --- generator/bindtests.ml | 3 ++- generator/c.ml | 29 ++++++++++++++++++++++++----- generator/csharp.ml | 4 ++-- generator/daemon.ml | 20 ++++++++++...
2019 Dec 20
0
[common/libguestfs PATCH 2/2] build: use split stringlist functions from common/utils
...ons using gnulib functions, however without linking to gnulib. When building with default build flags (e.g. without as-needed mode), the gnulib symbols cannot be resolved, leading to unusable OCaml and Python libraries. As solution, update the common submodule to get the split of the split of the stringlist functions in common/utils, and adapt the OCaml and Python bindings: - both now use stringlists-utils.c instead of utils.c - fix the Python distutils setup to include only the sources really needed --- .gitignore | 9 ++------- generator/python.ml | 2 +- ocaml/Makefile.am | 2 +- p...
2019 Dec 20
3
[common/libguestfs PATCH 0/2] Fix OCaml/Python linking
Make sure they can build also in no as-neede setups. Pino Toscano (1): utils: split string list functions in own file build: use split stringlist functions from common/utils utils/Makefile.am | 2 + utils/guestfs-stringlists-utils.h | 30 +++++ utils/guestfs-utils.h | 7 +- utils/stringlists-utils.c | 197 ++++++++++++++++++++++++++++++ utils/utils.c | 165 -----------------------...
2009 Aug 17
13
total warning-removal for daemon/
The warnings in daemon were aggravating and risky for development (too easy to miss new ones) so I spent some time last week and today working on removing them. The first patch gets us down to almost no warnings with the original -Wall setting. That was by far the hardest part. Once I'd done that, I enabled nearly all of gcc's warnings via gnulib's warnings and manywarnings modules
2017 Apr 21
0
[PATCH 2/2] generator: Don't permit certain String/stringt combinations.
..., 23 insertions(+) diff --git a/generator/checks.ml b/generator/checks.ml index 788a11624..c30790dac 100644 --- a/generator/checks.ml +++ b/generator/checks.ml @@ -154,6 +154,29 @@ let () = List.iter check_arg_type args; ) (actions |> daemon_functions); + (* Some String/stringt and StringList/stringt combinations are + * not permitted. + *) + List.iter ( + fun { name = name; style = _, args, _ } -> + let check_arg_type = function + (* Previously only DeviceList and FilenameList were special list + * types. We could permit more here in future. + *)...
2020 Jan 09
1
[common/libguestfs PATCH] utils: conditionally include config.h on HAVE_CONFIG_H
autotools define HAVE_CONFIG_H to signal a config.h was generated; since this file is built directly also in bindings without the use of config.h, make sure config.h is not requested in those cases. This file uses only POSIX functions anyway, so it should not be a problem. --- utils/stringlists-utils.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/stringlists-utils.c b/utils/stringlists-utils.c index 92c8030..97ad360 100644 --- a/utils/stringlists-utils.c +++ b/utils/stringlists-utils.c @@ -23,7 +23,9 @@ * such as C<safe_*>, C<error> or C<perrorf>, or an...
2019 Jun 21
0
[libnbd PATCH v2 1/5] generator: Allow Int in callbacks
...thon_binding name { args; ret } = (* The following not yet implemented for callbacks XXX *) | ArrayAndLen _ | Bool _ | BytesOut _ | BytesPersistIn _ | BytesPersistOut _ | Callback _ | CallbackPersist _ - | Flags _ | Int _ | Int64 _ | Path _ | SockAddrAndLen _ | StringList _ + | Flags _ | Int64 _ | Path _ | SockAddrAndLen _ | StringList _ | UInt _ | UInt32 _ -> assert false ) args; pr "\n"; @@ -3278,13 +3279,14 @@ let print_python_binding name { args; ret } = function | ArrayAndLen (UInt32 n, len) -&g...
2017 Apr 21
4
[PATCH 0/2] generator: Simplify the handling of string parameters.
Very large but mechanical change to the generator. Rich.
2017 Apr 21
0
[PATCH 1/2] generator: Simplify the handling of string parameters.
Previously we had lots of types like String, Device, StringList, DeviceList, etc. where Device was just a String with magical properties (but only inside the daemon), and DeviceList was just a list of Device strings. Replace these with some simple top-level types: String StringList and move the magic into a subtype. The change is mechanical, for example...
2014 Feb 10
5
[PATCH 0/4] add GUID validation (RHBZ#1008417)
Hi, this patch serie adds a new GUID type in the generator, which would do the same as String, but also validating (just in the C output) the passed GUID string. This allows to reject invalid GUIDs before passing them to low-level tools. Pino Toscano (4): utils: add a function to validate a GUID string generator: add a GUID parameter type generator: generate code for parameter validation
2020 Sep 29
2
[PATCH libnbd] generator: Add SizeT type, maps to C size_t.
...deletions(-) diff --git a/generator/API.ml b/generator/API.ml index 0a876c4..b93580d 100644 --- a/generator/API.ml +++ b/generator/API.ml @@ -47,6 +47,7 @@ and arg = | Int of string | Int64 of string | Path of string +| SizeT of string | SockAddrAndLen of string * string | String of string | StringList of string diff --git a/generator/API.mli b/generator/API.mli index 9d2fdb7..2e7aa78 100644 --- a/generator/API.mli +++ b/generator/API.mli @@ -57,6 +57,7 @@ and arg = | Int of string (** small int *) | Int64 of string (** 64 bit signed int *) | Path of string (** fi...
2015 Oct 20
0
[PATCH 2/2] actions: turn some params into RelativePathnameList (RHBZ#1174551).
...484 100644 --- a/generator/actions.ml +++ b/generator/actions.ml @@ -2655,7 +2655,7 @@ See also C<guestfs_write>." }; { defaults with name = "lstatlist"; added = (1, 0, 77); - style = RStructList ("statbufs", "stat"), [Pathname "path"; StringList "names"], []; + style = RStructList ("statbufs", "stat"), [Pathname "path"; RelativePathnameList "names"], []; deprecated_by = Some "lstatnslist"; shortdesc = "lstat on multiple files"; longdesc = "\ @@ -26...
2019 Jun 18
0
[libnbd RFC PATCH 9/8] wip: generator: Add ReadStatus enum type
...int *) | Opaque of string (* opaque object, void* in C *) | Path of string (* filename or path *) +| ReadStatus of string (* enum of pread_callback status *) | SockAddrAndLen of string * string (* struct sockaddr * + socklen_t *) | String of string (* string *) | StringList of string (* argv-style NULL-terminated array of strings *) @@ -2033,10 +2034,13 @@ let constants = [ "CMD_FLAG_NO_HOLE", 1 lsl 1; "CMD_FLAG_DF", 1 lsl 2; "CMD_FLAG_REQ_ONE", 1 lsl 3; - - "READ_DATA", 1; - "READ_HOL...
2009 Sep 11
2
[PATCH] generator.ml: Fix string list memory leak
...ns(-) diff --git a/src/generator.ml b/src/generator.ml index 7571f95..c72c329 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -6320,7 +6320,7 @@ and generate_fish_cmds () = | OptString n | FileIn n | FileOut n -> pr " const char *%s;\n" n - | StringList n | DeviceList n -> pr " char *const *%s;\n" n + | StringList n | DeviceList n -> pr " char **%s;\n" n | Bool n -> pr " int %s;\n" n | Int n -> pr " int %s;\n" n ) (snd style); @@ -6364,6 +6364,20 @@ and generat...
2019 Jun 18
0
[libnbd PATCH 6/8] states: Add nbd_pread_callback API
...thon_binding name { args; ret } = (* The following not yet implemented for callbacks XXX *) | ArrayAndLen _ | Bool _ | BytesOut _ | BytesPersistIn _ | BytesPersistOut _ | Callback _ | CallbackPersist _ - | Flags _ | Int _ | Int64 _ | Path _ | SockAddrAndLen _ | StringList _ + | Flags _ | Int64 _ | Path _ | SockAddrAndLen _ | StringList _ | UInt _ | UInt32 _ -> assert false ) args; pr "\n"; @@ -3282,13 +3368,14 @@ let print_python_binding name { args; ret } = function | ArrayAndLen (UInt32 n, len) -&g...
2019 Jun 29
0
[libnbd PATCH 3/6] generator: Allow Int64 in callbacks
...let print_python_binding name { args; ret } = | ArrayAndLen _ | Bool _ | BytesOut _ | BytesPersistIn _ | BytesPersistOut _ | Callback _ | CallbackPersist _ - | Flags _ | Int64 _ | Mutable _ + | Flags _ | Mutable _ | Path _ | SockAddrAndLen _ | StringList _ | UInt _ | UInt32 _ -> assert false ) args; @@ -3537,6 +3538,7 @@ let print_python_binding name { args; ret } = | ArrayAndLen (UInt32 n, len) -> pr " \"O\"" | BytesIn (n, len) -> pr " \"y#\"" | Int n...
2019 Jun 20
1
Re: [libnbd RFC PATCH 9/8] wip: generator: Add ReadStatus enum type
...ng (* opaque object, void* in C *) > | Path of string (* filename or path *) > +| ReadStatus of string (* enum of pread_callback status *) > | SockAddrAndLen of string * string (* struct sockaddr * + socklen_t *) > | String of string (* string *) > | StringList of string (* argv-style NULL-terminated array of strings *) > @@ -2033,10 +2034,13 @@ let constants = [ > "CMD_FLAG_NO_HOLE", 1 lsl 1; > "CMD_FLAG_DF", 1 lsl 2; > "CMD_FLAG_REQ_ONE", 1 lsl 3; > - > - "READ_DATA",...
2019 Jul 24
0
[PATCH libnbd v2 5/5] lib: Use unsigned for pread_structured status parameter.
..._ + | UInt64 _ -> () (* The following not yet implemented for callbacks XXX *) | ArrayAndLen _ | Bool _ | BytesOut _ | BytesPersistIn _ | BytesPersistOut _ | Closure _ | Flags _ | Mutable _ | Path _ | SockAddrAndLen _ | StringList _ - | UInt _ | UInt32 _ -> assert false + | UInt32 _ -> assert false ) cbargs; pr "\n"; @@ -3820,6 +3821,7 @@ let print_python_binding name { args; ret } = | Int64 n -> pr " \"L\"" | Mutable (Int n) -...
2019 Jun 20
1
Re: [libnbd PATCH 6/8] states: Add nbd_pread_callback API
...args; ret } = > (* The following not yet implemented for callbacks XXX *) > | ArrayAndLen _ | Bool _ | BytesOut _ > | BytesPersistIn _ | BytesPersistOut _ | Callback _ | CallbackPersist _ > - | Flags _ | Int _ | Int64 _ | Path _ | SockAddrAndLen _ | StringList _ > + | Flags _ | Int64 _ | Path _ | SockAddrAndLen _ | StringList _ > | UInt _ | UInt32 _ -> assert false > ) args; > pr "\n"; > @@ -3282,13 +3368,14 @@ let print_python_binding name { args; ret } = > function >...