search for: d0c79bb

Displaying 2 results from an estimated 2 matches for "d0c79bb".

Did you mean: d0179cbb
2019 Nov 25
0
[PATCH nbdkit 1/2] python: For v2 API, avoid copy by passing a buffer to pread.
....len < count) { + nbdkit_error ("%s: buffer returned from pread is too small", script); + goto out; + } - memcpy (buf, view.buf, count); + memcpy (buf, view.buf, count); + } ret = 0; out: diff --git a/tests/python-exception.py b/tests/python-exception.py index d0c79bb..ee4a3f3 100644 --- a/tests/python-exception.py +++ b/tests/python-exception.py @@ -62,5 +62,5 @@ def get_size(h): return 0 -def pread(h, count, offset): - return "" +def pread(h, buf, offset): + buf[:] = bytearray(len(buf)) diff --git a/tests/shebang.py b/tests/shebang.py...
2019 Nov 25
3
[PATCH nbdkit 0/2] python: Implement pread passing buffer for v2 API.
As suggested by Nir, here: https://www.redhat.com/archives/libguestfs/2019-November/thread.html#00220