Displaying 20 results from an estimated 103 matches for "ostringlist".
Did you mean:
stringlist
2012 Aug 14
7
[PATCH 0/7] Add tar compress, numericowner, excludes flags.
...ut
deprecated, and expands the range of compression types available.
Secondly (2/7) we add an optional numericowner boolean to tar-out,
which generates numeric UIDs/GIDs in the resulting tar file.
The remaining patches allow us to encode the '--exclude=PATTERN'
argument to tar. We add an OStringList type to the generator for
passing optional lists of strings. Then we modify tar-out so that
this can be translated into zero or more '--exclude' arguments to tar.
Note that OStringList is not yet implemented for GObject bindings.
Rich.
2014 Aug 11
3
[PATCH] python: fix possible free on uninit memory with OStringList optargs
When using optional arguments of type OStringList, the code free'ing
the member in the optargs_s struct corresponding to that optional
argument would just check for a non-PyNone PyObject for that argument.
If before that optional argument there are other arguments which can
cause an earlier error return from that binding function, the free'...
2015 Feb 10
0
[PATCH 4/4] php: fix memory leak in OStringList optargs
...r/php.ml
+++ b/generator/php.ml
@@ -458,6 +458,16 @@ PHP_FUNCTION (guestfs_last_error)
pr "\n"
| Bool _ | Int _ | Int64 _ | Pointer _ -> ()
) args;
+ List.iter (
+ function
+ | OBool n | OInt n | OInt64 n | OString n -> ()
+ | OStringList n ->
+ let uc_n = String.uppercase n in
+ pr " if ((optargs_s.bitmask & %s_%s_BITMASK) != 0)\n"
+ c_optarg_prefix uc_n;
+ pr " guestfs_efree_stringlist ((char **) optargs_s.%s);\n" n;
+ pr "\n"
+...
2015 Dec 03
1
Re: RFC: arbitrary parameters for add_drive
...ible solution for this could be adding a single extra optional
> > argument as hash-table (or list of "param=value") for all these
> > rarely used parameters specific to different protocols. How would that
> > look?
>
> So that would be adding OHashtable, or using OStringList in some way?
Yes, something like either of the above; what would you think to be the
cleanest approach here?
* OHashtable
+ better representing it is a string -> string association
+ native type for GObject, Go, Java, Lua, Perl, PHP, Python, Ruby
- not ideal representation in C: either as list...
2015 Dec 02
2
RFC: arbitrary parameters for add_drive
Hi,
one of the bugs we have (#1092583) is about the lack of query string
for http/https URLs: there were patches about that (not merged yet),
whose solution was to add a new optional argument "querystring".
Another bug that I'm looking at (#1118305) is about setting initiator
IQNs for iSCSI drives; a good solution IMHO would be add a new
initiator-name parameter for this.
Thinking
2019 Jun 27
0
[PATCH 5/9] Rust bindings: Add generator of structs for optional arguments
...uot; n
+ | OInt _ ->
+ pr " _%s: Option<i32>,\n" n
+ | OInt64 _ ->
+ pr " _%s: Option<i64>,\n" n
+ | OString _ ->
+ pr " _%s: Option<String>,\n" n
+ | OStringList _ ->
+ pr " _%s: Option<Vec<String>>,\n" n
+ ) optargs;
+ pr "}\n\n";
+ pr "impl OptArgs%s {\n" cname;
+ List.iter (
+ fun optarg ->
+ let n = translate_bad_symbols (name_of_optargt optar...
2012 Aug 25
1
[PATCH] python: Fixed syntax errors in python/guestfs-py.c
...ot;;
- pr " bytes = PyUnicode_AsUTF8String (py_%s));\n" n;
+ pr " bytes = PyUnicode_AsUTF8String (py_%s);\n" n;
pr " optargs_s.%s = PyBytes_AS_STRING (bytes);\n" n;
pr "#endif\n";
| OStringList _ ->
--
1.7.9.6 (Apple Git-31.1)
2012 Dec 18
0
Issues with GObject bindings
Matt, further to the conversation today.
When you run the tests (make -C gobject check) you'll find it now
prints the descriptive message:
"GObject bind tests skipped: Int64, OInt64 and OStringList are all broken"
That nicely sums up the first two problems.
(1) When I tested passing the full range of int64, it turns out to be
broken. There are probably two layers of brokenness, ie. Javascript
itself has broken integers as a design failure of the language, but
also I convinced myself a...
2017 Feb 14
1
Re: [PATCH 06/10] copy-out: new 'excludes' optional argument
...ds cannot be used." };
>
> { defaults with
> name = "copy_out"; added = (1, 29, 24);
> - style = RErr, [Pathname "remotepath"; String "localdir"], [];
> + style = RErr, [Pathname "remotepath"; String "localdir"], [OStringList "excludes"];
This change seems reasonable. Should we:
(1) Bind other tar-out parameters? It looks as if numericowner,
xattrs, selinux and acls would all be candidates.
(2) More importantly for this patch, keep the order of the options
compatible with tar-out? This would allow us to...
2019 Jun 27
0
Re: [PATCH 08/11] Rust bindings: Fix memory management and format the file
...te structs for optional arguments *)
List.iter (
fun ({ name = name; shortdesc = shortdesc;
style = (ret, args, optargs) }) ->
let cname = snake2caml name in
+ let rec contains_ptr args = match args with
+ | [] -> false
+ | OString _ ::_
+ | OStringList _::_ -> true
+ | _::xs -> contains_ptr xs
+ in
+ let opt_life_parameter = if contains_ptr optargs then "<'a>" else "" in
if optargs <> [] then (
pr "\n";
pr "/* Optional Structs */\n";
p...
2020 Jul 06
2
[PATCH] python: Add type hints
...st _ -> ": List[str]"
+ | Pointer _ -> ""
+ in
+ let type_hint_of_optargt optarg =
+ match optarg with
+ | OBool _ -> "bool"
+ | OInt _ | OInt64 _ -> "int"
+ | OString _ -> "str"
+ | OStringList _ -> "List[str]"
+ in
let decl_string =
"self" ^
- map_join (fun arg ->sprintf ", %s" (name_of_argt arg))
+ map_join (fun arg ->sprintf ", %s%s" (name_of_argt arg) (type_hint_of_argt arg))
args ^
-...
2015 Jul 15
1
[PATCH 1/2] actions: tar_out: add xattrs and selinux optargs
...ns.ml
+++ b/generator/actions.ml
@@ -4824,7 +4824,7 @@ compression types)." };
{ defaults with
name = "tar_out"; added = (1, 0, 3);
- style = RErr, [String "directory"; FileOut "tarfile"], [OString "compress"; OBool "numericowner"; OStringList "excludes"];
+ style = RErr, [String "directory"; FileOut "tarfile"], [OString "compress"; OBool "numericowner"; OStringList "excludes"; OBool "xattrs"; OBool "selinux"];
proc_nr = Some 70;
once_had_no_opta...
2015 Feb 10
1
[PATCH] php: add a simple bindtests test
...uot;;
+ pr "--EXPECT--\n";
+
+ let dump filename =
+ let chan = open_in filename in
+ let rec loop () =
+ let line = input_line chan in
+ (match string_split ":" line with
+ | ("obool"|"oint"|"oint64"|"ostring"|"ostringlist") as x :: _ ->
+ pr "%s: unset\n" x
+ | _ -> pr "%s\n" line
+ );
+ loop ()
+ in
+ (try loop () with End_of_file -> ());
+ close_in chan in
+
+ dump "bindtests"
+
(* Language-independent bindings tests - we do it this way t...
2015 Jul 01
2
Re: URI Handling Patch
Hi All,
Here's the latest patch. I think this should address the problem. The
query string is now only appended to the end of a URI in the HTTP and HTTPS
cases.
The add-uri test now passes, and 'make check' still passes.
-- Gabriel
2019 Jul 29
0
Re: [PATCH] Rust bindings: Add Rust bindings
...ition in the if sounds like List.mem :) What about:
>
> if List.mem s black_list then
>
> > + let cname = snake2caml name in
> > + let rec contains_ptr args = match args with
> > + | [] -> false
> > + | OString _ ::_
> > + | OStringList _::_ -> true
> > + | _::xs -> contains_ptr xs
>
> As above, you can avoid the explicit match on the last parameter using
> the function syntax.
>
> OTOH, I think you can use List.exists here:
>
> let contains_ptr =
> List.exists (
> function
>...
2016 Dec 08
4
[PATCH] generator: Share Common_utils code.
...(String.uppercase_ascii n);
pr " fprintf (fp, %s);\n" printf_args;
pr " } else {\n";
pr " fprintf (fp, \"unset\\n\");\n";
@@ -200,7 +201,7 @@ fill_lvm_pv (guestfs_h *g, struct guestfs_lvm_pv *pv, size_t i)
| OStringList n ->
pr " fprintf (fp, \"%s: \");\n" n;
pr " if (optargs->bitmask & %s_%s_BITMASK) {\n" c_optarg_prefix
- (String.uppercase n);
+ (String.uppercase_ascii n);
pr " print_strings (g, optargs->%...
2019 Jun 27
4
Re: [PATCH 9/9] Rust bindings: Complete bindings
Patch 9 is a kind of dumping ground of all kinds of stuff. It may be
better to spend some time with git rebase -i trying to work this into
more coherent patches.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot with a
live
2015 Feb 10
4
[PATCH 1/4] php: fix invalid memory access with OptString
OptString maps to a "s!" argument, which makes zend_parse_parameters not
touch the variables (char* and length) when NULL is passed as parameter.
Hence, set both to NULL/0, and check for non-NULL char* variable before
checking its length.
---
generator/php.ml | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/generator/php.ml b/generator/php.ml
index
2019 Jul 26
4
Re: [PATCH] Rust bindings: Add Rust bindings
...+ else
> + s
Hm IMHO the condition in the if sounds like List.mem :) What about:
if List.mem s black_list then
> + let cname = snake2caml name in
> + let rec contains_ptr args = match args with
> + | [] -> false
> + | OString _ ::_
> + | OStringList _::_ -> true
> + | _::xs -> contains_ptr xs
As above, you can avoid the explicit match on the last parameter using
the function syntax.
OTOH, I think you can use List.exists here:
let contains_ptr =
List.exists (
function
| OString _
| OStringList _ -> true
|...
2017 Feb 15
1
[PATCH v2] copy-out: new optional arguments
...ot be used." };
{ defaults with
name = "copy_out"; added = (1, 29, 24);
- style = RErr, [Pathname "remotepath"; String "localdir"], [];
+ style = RErr, [Pathname "remotepath"; String "localdir"], [OBool "numericowner"; OStringList "excludes"; OBool "xattrs"; OBool "selinux"; OBool "acls"];
visibility = VPublicNoFish;
+ once_had_no_optargs = true;
shortdesc = "copy remote files or directories out of an image";
longdesc = "\
C<guestfs_copy_out> cop...