search for: bytespersistout

Displaying 20 results from an estimated 92 matches for "bytespersistout".

2019 May 28
0
[PATCH] api: Add a special type for the flags argument.
...6 files changed, 53 insertions(+), 25 deletions(-) diff --git a/generator/generator b/generator/generator index 9f107dc..5d46938 100755 --- a/generator/generator +++ b/generator/generator @@ -820,6 +820,7 @@ and arg = | BytesPersistIn of string * string (* same as above, but buffer persists *) | BytesPersistOut of string * string | Callback of string * arg list (* callback function returning void *) +| Flags of string (* NBD_CMD_FLAG_* flags *) | Int of string (* small int *) | Int64 of string (* 64 bit signed int *) | Opaque of string (* opaque object, void* in C...
2019 May 28
2
[PATCH] api: Add a special type for the flags argument.
This applies on top of patches 1 & 2 here (instead of patch 3): https://www.redhat.com/archives/libguestfs/2019-May/msg00206.html https://www.redhat.com/archives/libguestfs/2019-May/msg00207.html Rich.
2019 Jul 16
0
[libnbd PATCH 2/2] RFC: generator: Handle shared callbacks in Python
...eded. + *) +} and arg = | ArrayAndLen of arg * string (* array + number of entries *) | Bool of string (* bool *) @@ -849,13 +856,14 @@ and arg = written by the function *) | BytesPersistIn of string * string (* same as above, but buffer persists *) | BytesPersistOut of string * string -| Callback of string * arg list (* callback function returning int *) -| CallbackPersist of string * arg list (* as above, but callback persists *) | Flags of string (* NBD_CMD_FLAG_* flags *) | Int of string (* small int *) | Int64 of string (* 6...
2019 Aug 10
0
[PATCH libnbd 3/9] generator: Add Enum type for enumerated types / unions.
...TLS should have a way to pass in PIN or password to diff --git a/generator/generator b/generator/generator index 5823686..73b8b79 100755 --- a/generator/generator +++ b/generator/generator @@ -855,6 +855,7 @@ and arg = | BytesPersistIn of string * string (* same as above, but buffer persists *) | BytesPersistOut of string * string | Closure of closure (* function pointer + void *opaque *) +| Enum of string * enum (* enum/union type, int in C *) | Int of string (* small int *) | Int64 of string (* 64 bit signed int *) | Path of string (* filename or path *) @@ -890...
2019 Aug 10
0
[PATCH libnbd 6/9] generator: Add non-optional Flags type.
...ke OFlags but is a non-optional argument. --- generator/generator | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/generator/generator b/generator/generator index 2b37cea..96d1148 100755 --- a/generator/generator +++ b/generator/generator @@ -856,6 +856,7 @@ and arg = | BytesPersistOut of string * string | Closure of closure (* function pointer + void *opaque *) | Enum of string * enum (* enum/union type, int in C *) +| Flags of string * flags (* flags, uint32_t in C *) | Int of string (* small int *) | Int64 of string (* 64 bit signed int *) |...
2019 Jul 16
3
[RFC libnbd PATCH 0/2] Start fixing python nbd.pread_structured_callback
Posting now that I got something to compile (at the expense of breaking OCaml bindings), but I'm open to ideas on how to improve it. Eric Blake (2): generator: Tweak print_c_arg_list to take alternate first arg RFC: generator: Handle shared callbacks in Python generator/generator | 556 ++++++++++++++++++++++---------------------- 1 file changed, 280 insertions(+), 276 deletions(-) --
2019 Jun 29
0
[libnbd PATCH 3/6] generator: Allow Int64 in callbacks
...dname = PyUnicode_FromString (\"ctypes\");\n" n; pr " if (!py_%s_modname) { PyErr_PrintEx (0); return -1; }\n" n; @@ -3525,7 +3526,7 @@ 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; re...
2019 Jul 24
0
[PATCH libnbd 1/3] generator: Change Closure so it describes single callbacks.
...it a/generator/generator b/generator/generator index fdacd71..3b57713 100755 --- a/generator/generator +++ b/generator/generator @@ -849,10 +849,10 @@ and arg = written by the function *) | BytesPersistIn of string * string (* same as above, but buffer persists *) | BytesPersistOut of string * string -| Closure of bool * closure list (* void *opaque + one or more closures - flag if true means callbacks persist - in the handle, false means they only - exist during the function call *) +| Clo...
2019 Jun 21
0
[libnbd PATCH v2 1/5] generator: Allow Int in callbacks
...r " struct %s_%s_data *_data = %s;\n" name cb_name n | String n @@ -3268,7 +3269,7 @@ let print_python_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,...
2019 Aug 09
0
[PATCH libnbd 2/2] generator: Change handling of Flags to be a true optional argument.
...onal parameters (not optional in C) *) ret : ret; (* return value *) shortdesc : string; (* short description *) longdesc : string; (* long description *) @@ -854,7 +855,6 @@ and arg = | BytesPersistIn of string * string (* same as above, but buffer persists *) | BytesPersistOut of string * string | Closure of closure (* function pointer + void *opaque *) -| Flags of string (* NBD_CMD_FLAG_* flags *) | Int of string (* small int *) | Int64 of string (* 64 bit signed int *) | Path of string (* filename or path *) @@ -864,6 +8...
2019 Aug 09
4
[PATCH libnbd 0/2] generator: Preparatory changes to the generator.
These are some simplifications to the generator. They don't probably make much sense on their own, but they are preparatory to better handling of enums, and or'd lists of flags. Rich.
2019 Jun 25
3
[PATCH libnbd] generator: Add Mutable type to the generator.
...| Opaque n -> pr " struct %s_%s_data *_data = %s;\n" name cb_name n | String n | UInt64 n -> () (* The following not yet implemented for callbacks XXX *) | ArrayAndLen _ | Bool _ | BytesOut _ - | BytesPersistIn _ | BytesPersistOut _ | Callback _ | CallbackPersist _ - | Flags _ | Int _ | Int64 _ | Path _ | SockAddrAndLen _ | StringList _ + | BytesPersistIn _ | BytesPersistOut _ + | Callback _ | CallbackPersist _ + | Flags _ | Int _ | Int64 _ | Mutable _ + | Path _ | SockAddrAndLen _ | S...
2019 Aug 09
0
[PATCH libnbd 1/2] generator: Handle closure args (cbargs) specially.
..."nr_entries"); + CBMutable (Int "error")] }; Flags "flags" ]; ret = RErr; permitted_states = [ Connected ]; @@ -1774,7 +1781,7 @@ C<nbd_pread>."; default_call with args = [ BytesPersistOut ("buf", "count"); UInt64 "offset"; Closure { cbname="completion"; - cbargs=[Mutable (Int "error")] }; + cbargs=[CBMutable (Int "error")] }; Flags "flags" ];...
2019 Jul 24
8
[PATCH libnbd v2 0/5] lib: Implement closure lifetimes.
v1 was here: https://www.redhat.com/archives/libguestfs/2019-July/thread.html#00231 The changes address everything that Eric picked up in his review of the first two patches. I have also added two more patches (4 and 5) which respectively fix docs and change int status -> unsigned status, as discussed. Passes make, check, check-valgrind. Rich.
2019 Jul 24
6
[PATCH libnbd 0/3] Implement closure lifetimes.
This implements most of what I wrote here: https://www.redhat.com/archives/libguestfs/2019-July/msg00213.html
2019 Jul 16
0
[PATCH libnbd v2] generator: Define new Closure type instead of callbacks.
...it a/generator/generator b/generator/generator index caa6353..d166c11 100755 --- a/generator/generator +++ b/generator/generator @@ -849,13 +849,14 @@ and arg = written by the function *) | BytesPersistIn of string * string (* same as above, but buffer persists *) | BytesPersistOut of string * string -| Callback of string * arg list (* callback function returning int *) -| CallbackPersist of string * arg list (* as above, but callback persists *) +| Closure of bool * closure list (* void *opaque + one or more closures + flag if true means callback...
2019 Jul 16
2
[PATCH libnbd v2] generator: Define new Closure type
As before, but this one has working Python bindings. OCaml still TBD. Rich.
2019 Jun 18
0
[libnbd PATCH 6/8] states: Add nbd_pread_callback API
...;0> for now (it exists for future NBD protocol extensions)."; @@ -1591,6 +1656,26 @@ C<buf> is valid until the command has completed. Other parameters behave as documented in C<nbd_pread>."; }; + "aio_pread_callback", { + default_call with + args = [ BytesPersistOut ("buf", "count"); UInt64 "offset"; + Opaque "data"; + CallbackPersist ("chunk", [Opaque "data"; + BytesIn ("buf", "count"); +...
2020 Sep 10
1
[libnbd PATCH] python: Fix more memory leaks
...; ret; may_set_error } = | BytesIn (n, _) -> pr " Py_buffer %s;\n" n | BytesOut (n, count) -> - pr " char *%s;\n" n; + pr " char *%s = NULL;\n" n; pr " Py_ssize_t %s;\n" count | BytesPersistIn (n, _) | BytesPersistOut (n, _) -> @@ -279,11 +279,10 @@ let print_python_binding name { args; optargs; ret; may_set_error } = n; pr " struct py_aio_buffer *%s_buf;\n" n | Closure { cbname } -> - pr " struct user_data *%s_user_data = alloc_user_data ();\n" cbname; -...
2019 Jul 24
0
[PATCH libnbd v2 5/5] lib: Use unsigned for pread_structured status parameter.
...0); return -1; }\n" n; - | String n - | UInt64 n -> () + | String _ + | UInt _ + | 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_bin...