Displaying 15 results from an estimated 15 matches for "call_write".
Did you mean:
all_write
2023 Aug 30
2
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...const char **argv)
int r;
CLEANUP_FREE_STRING string ebuf = empty_vector;
- r = call3 (NULL, 0, rbuf, &ebuf, argv);
+ r = call3 (NULL, 0, NULL, rbuf, &ebuf, argv);
r = handle_script_error (argv[0], &ebuf, r);
if (r == ERROR)
string_reset (rbuf);
@@ -584,7 +579,26 @@ call_write (const char *wbuf, size_t wbuflen, const char **argv)
int r;
CLEANUP_FREE_STRING string rbuf = empty_vector;
CLEANUP_FREE_STRING string ebuf = empty_vector;
+ bool pipe_full = false;
- r = call3 (wbuf, wbuflen, &rbuf, &ebuf, argv);
+ r = call3 (wbuf, wbuflen, &pipe_full, &a...
2023 Aug 31
1
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...EANUP_FREE_STRING string ebuf = empty_vector;
>
> - r = call3 (NULL, 0, rbuf, &ebuf, argv);
> + r = call3 (NULL, 0, NULL, rbuf, &ebuf, argv);
> r = handle_script_error (argv[0], &ebuf, r);
> if (r == ERROR)
> string_reset (rbuf);
> @@ -584,7 +579,26 @@ call_write (const char *wbuf, size_t wbuflen, const char **argv)
> int r;
> CLEANUP_FREE_STRING string rbuf = empty_vector;
> CLEANUP_FREE_STRING string ebuf = empty_vector;
> + bool pipe_full = false;
>
> - r = call3 (wbuf, wbuflen, &rbuf, &ebuf, argv);
> + r = call3...
2023 Aug 31
1
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...EANUP_FREE_STRING string ebuf = empty_vector;
>
> - r = call3 (NULL, 0, rbuf, &ebuf, argv);
> + r = call3 (NULL, 0, NULL, rbuf, &ebuf, argv);
> r = handle_script_error (argv[0], &ebuf, r);
> if (r == ERROR)
> string_reset (rbuf);
> @@ -584,7 +579,26 @@ call_write (const char *wbuf, size_t wbuflen, const char **argv)
> int r;
> CLEANUP_FREE_STRING string rbuf = empty_vector;
> CLEANUP_FREE_STRING string ebuf = empty_vector;
> + bool pipe_full = false;
>
> - r = call3 (wbuf, wbuflen, &rbuf, &ebuf, argv);
> + r = call3...
2023 Aug 31
1
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...ty_vector;
> >
> > - r = call3 (NULL, 0, rbuf, &ebuf, argv);
> > + r = call3 (NULL, 0, NULL, rbuf, &ebuf, argv);
> > r = handle_script_error (argv[0], &ebuf, r);
> > if (r == ERROR)
> > string_reset (rbuf);
> > @@ -584,7 +579,26 @@ call_write (const char *wbuf, size_t wbuflen, const char **argv)
> > int r;
> > CLEANUP_FREE_STRING string rbuf = empty_vector;
> > CLEANUP_FREE_STRING string ebuf = empty_vector;
> > + bool pipe_full = false;
> >
> > - r = call3 (wbuf, wbuflen, &rbuf, &...
2020 Apr 15
0
[PATCH nbdkit 8/9] eval, sh: Set $tmpdir before running the command, instead of globally.
...+------
plugins/sh/call.c | 11 +++++++++++
plugins/sh/sh.c | 7 +------
4 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/plugins/sh/call.h b/plugins/sh/call.h
index 6aa70e56..78305d1e 100644
--- a/plugins/sh/call.h
+++ b/plugins/sh/call.h
@@ -49,4 +49,6 @@ extern exit_code call_write (const char *wbuf, size_t wbuflen,
const char **argv)
__attribute__((__nonnull__ (1, 3)));
+extern char tmpdir[];
+
#endif /* NBDKIT_CALL_H */
diff --git a/plugins/eval/eval.c b/plugins/eval/eval.c
index f09e49f3..3bc7f2a6 100644
--- a/plugins/eval/eval.c
+++ b/p...
2023 Aug 31
2
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...uf = empty_vector;
>>
>> - r = call3 (NULL, 0, rbuf, &ebuf, argv);
>> + r = call3 (NULL, 0, NULL, rbuf, &ebuf, argv);
>> r = handle_script_error (argv[0], &ebuf, r);
>> if (r == ERROR)
>> string_reset (rbuf);
>> @@ -584,7 +579,26 @@ call_write (const char *wbuf, size_t wbuflen, const char **argv)
>> int r;
>> CLEANUP_FREE_STRING string rbuf = empty_vector;
>> CLEANUP_FREE_STRING string ebuf = empty_vector;
>> + bool pipe_full = false;
>>
>> - r = call3 (wbuf, wbuflen, &rbuf, &ebuf, a...
2023 Aug 31
2
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...t; >> - r = call3 (NULL, 0, rbuf, &ebuf, argv);
> >> + r = call3 (NULL, 0, NULL, rbuf, &ebuf, argv);
> >> r = handle_script_error (argv[0], &ebuf, r);
> >> if (r == ERROR)
> >> string_reset (rbuf);
> >> @@ -584,7 +579,26 @@ call_write (const char *wbuf, size_t wbuflen, const char **argv)
> >> int r;
> >> CLEANUP_FREE_STRING string rbuf = empty_vector;
> >> CLEANUP_FREE_STRING string ebuf = empty_vector;
> >> + bool pipe_full = false;
> >>
> >> - r = call3 (wbuf, wb...
2023 Aug 31
1
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...gt;
>>> - r = call3 (NULL, 0, rbuf, &ebuf, argv);
>>> + r = call3 (NULL, 0, NULL, rbuf, &ebuf, argv);
>>> r = handle_script_error (argv[0], &ebuf, r);
>>> if (r == ERROR)
>>> string_reset (rbuf);
>>> @@ -584,7 +579,26 @@ call_write (const char *wbuf, size_t wbuflen, const char **argv)
>>> int r;
>>> CLEANUP_FREE_STRING string rbuf = empty_vector;
>>> CLEANUP_FREE_STRING string ebuf = empty_vector;
>>> + bool pipe_full = false;
>>>
>>> - r = call3 (wbuf, wbuflen,...
2019 Jan 02
0
[PATCH nbdkit v2 1/2] Annotate internal function parameters with attribute((nonnull)).
...ll.h
+++ b/plugins/sh/call.h
@@ -42,9 +42,13 @@ typedef enum exit_code {
RET_FALSE = 3 /* script exited with code 3 meaning false */
} exit_code;
-extern exit_code call (const char **argv);
-extern exit_code call_read (char **rbuf, size_t *rbuflen, const char **argv);
-extern exit_code call_write (const char *wbuf, size_t wbuflen, const char **argv);
+extern exit_code call (const char **argv)
+ __attribute__((__nonnull__ (1)));
+extern exit_code call_read (char **rbuf, size_t *rbuflen, const char **argv)
+ __attribute__((__nonnull__ (1, 2, 3)));
+extern exit_code call_write (const char *w...
2018 Dec 15
0
[PATCH nbdkit v2 3/4] sh: Switch nbdkit-sh-plugin to use API version 2.
...ar cbuf[32], obuf[32], fbuf[32];
+ const char *args[] = { script, "pwrite", h, cbuf, obuf, fbuf, NULL };
snprintf (cbuf, sizeof cbuf, "%" PRIu32, count);
snprintf (obuf, sizeof obuf, "%" PRIu64, offset);
+ flags_string (flags, fbuf, sizeof fbuf);
switch (call_write (buf, count, args)) {
case OK:
@@ -467,12 +508,6 @@ sh_can_flush (void *handle)
return boolean_method (handle, "can_flush");
}
-static int
-sh_can_trim (void *handle)
-{
- return boolean_method (handle, "can_trim");
-}
-
static int
sh_is_rotational (void *handle)
{...
2019 Jan 02
4
[PATCH nbdkit v2 0/2] Use of attribute(()).
v1 was here:
https://www.redhat.com/archives/libguestfs/2019-January/msg00008.html
In v2 I have provided two patches:
The first patch extends attribute((nonnull)) to most internal
functions, but not to the external API.
The second patch uses a macro so that attribute((format)) is only used
in the public API on GCC or Clang. At least in theory these headers
could be used by a C compiler which
2023 Aug 31
0
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...&ebuf, argv);
> >>>> + r = call3 (NULL, 0, NULL, rbuf, &ebuf, argv);
> >>>> r = handle_script_error (argv[0], &ebuf, r);
> >>>> if (r == ERROR)
> >>>> string_reset (rbuf);
> >>>> @@ -584,7 +579,26 @@ call_write (const char *wbuf, size_t wbuflen, const char **argv)
> >>>> int r;
> >>>> CLEANUP_FREE_STRING string rbuf = empty_vector;
> >>>> CLEANUP_FREE_STRING string ebuf = empty_vector;
> >>>> + bool pipe_full = false;
> >>>&...
2023 Aug 31
1
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...all3 (NULL, 0, rbuf, &ebuf, argv);
> >>> + r = call3 (NULL, 0, NULL, rbuf, &ebuf, argv);
> >>> r = handle_script_error (argv[0], &ebuf, r);
> >>> if (r == ERROR)
> >>> string_reset (rbuf);
> >>> @@ -584,7 +579,26 @@ call_write (const char *wbuf, size_t wbuflen, const char **argv)
> >>> int r;
> >>> CLEANUP_FREE_STRING string rbuf = empty_vector;
> >>> CLEANUP_FREE_STRING string ebuf = empty_vector;
> >>> + bool pipe_full = false;
> >>>
> >>>...
2018 Dec 15
5
[PATCH nbdkit v2 0/4] tests: Test export flags (eflags).
v1 was here:
https://www.redhat.com/archives/libguestfs/2018-December/thread.html#00123
v2:
- Document "-" instead of "script=-" and use it in the test; and
verify this also works on FreeBSD; and verify that it doesn't
depend on the particular behaviour of our wrapper script and should
work with installed nbdkit too.
- Fix handling of zero flags parameter.
-
2020 Apr 15
18
[PATCH nbdkit 0/9] Generic vector, and pass $nbdkit_stdio_safe to shell scripts.
This was a rather longer trip around the houses than I anticipated!
The basic purpose of the patch series is to set $nbdkit_stdio_safe to
"0" or "1" in sh and eval plugin scripts.
To do that, I ended up adding a nicer way to manipulate environ lists,
and to do that, I ended up adding a whole generic vector
implementation which is applicable in a lot of different places.