Displaying 20 results from an estimated 24 matches for "get_script".
2020 Mar 19
0
[nbdkit PATCH 1/2] sh, eval: Cache .can_zero and .can_flush
...ication, are permitted provided that the following conditions are
@@ -193,29 +193,42 @@ sh_preconnect (int readonly)
}
}
+struct sh_handle {
+ int can_flush;
+ int can_zero;
+ char *h;
+};
+
void *
sh_open (int readonly)
{
const char *method = "open";
const char *script = get_script (method);
- char *h = NULL;
size_t hlen;
const char *args[] =
{ script, method,
readonly ? "true" : "false",
nbdkit_export_name () ? : "",
NULL };
+ struct sh_handle *h = malloc (sizeof *h);
+
+ if (!h) {
+ nbdkit_error ("mall...
2020 Mar 19
5
[nbdkit PATCH 0/2] More caching of initial setup
When I added .can_FOO caching in 1.16, I missed the case that the sh
plugin itself was calling .can_flush twice in some situations (in
order to default .can_fua). Then right after, I regressed it to call
.can_zero twice (in order to default .can_fast_zero). I also missed
that .thread_model could use better caching, because at the time, I
did not add testsuite coverage. Fix that now.
Eric Blake
2020 Feb 10
3
[nbdkit PATCH] eval: Allow user override of 'missing'
...verridden by the user.
*/
missing = create_script ("missing", "exit 2\n");
if (!missing)
@@ -255,11 +261,15 @@ static int
add_method (const char *key, const char *value)
{
char *script;
+ char *tmp = missing; /* Needed to allow user override of missing */
- if (get_script (key) != missing) {
+ missing = NULL;
+ if (get_script (key) != NULL) {
+ missing = tmp;
nbdkit_error ("method %s defined more than once on the command line", key);
return -1;
}
+ missing = tmp;
/* Do a bit of checking to make sure the key isn't malicious. This...
2020 Feb 10
0
Re: [nbdkit PATCH] eval: Allow user override of 'missing'
...= create_script ("missing", "exit 2\n");
> if (!missing)
> @@ -255,11 +261,15 @@ static int
> add_method (const char *key, const char *value)
> {
> char *script;
> + char *tmp = missing; /* Needed to allow user override of missing */
>
> - if (get_script (key) != missing) {
> + missing = NULL;
> + if (get_script (key) != NULL) {
> + missing = tmp;
> nbdkit_error ("method %s defined more than once on the command line", key);
> return -1;
> }
> + missing = tmp;
This leaks the missing global?
But yes...
2020 Apr 19
0
[PATCH nbdkit 2/2] Add insert function and use the new vector library in several places.
...- r = compare_script (method, &method_scripts[i]);
+ for (i = 0; i < method_scripts.size; ++i) {
+ r = compare_script (method, &method_scripts.ptr[i]);
/* This shouldn't happen. insert_method_script() must not be
* called if the method has already been added. Call get_script()
* first to check.
@@ -126,17 +119,19 @@ insert_method_script (const char *method, char *script)
assert (r != 0);
if (r < 0) {
/* Insert before this element. */
- memmove (&method_scripts[i+1], &method_scripts[i],
- sizeof (struct method_script)...
2020 Mar 19
2
Re: [nbdkit PATCH 1/2] sh, eval: Cache .can_zero and .can_flush
...t; backend_can_flush().
>
> Fixes: 05c5eed6f2
> Fixes: 8490694d08
> Signed-off-by: Eric Blake <eblake@redhat.com>
> ---
> @@ -457,8 +473,14 @@ int
> sh_can_flush (void *handle)
> {
> const char *method = "can_flush";
> - const char *script = get_script (method);
> - return boolean_method (script, method, handle, 0);
> + const char *script;
> + struct sh_handle *h = handle;
> +
> + if (h->can_flush >= 0)
> + return h->can_flush;
> +
> + script = get_script (method);
> + return h->can_flush = boolean_...
2020 Apr 19
2
[PATCH nbdkit 1/2] vddk: Use new vector library to allocate the argv list.
---
plugins/vddk/vddk.c | 41 +++++++++++++++++++++++++----------------
TODO | 1 -
2 files changed, 25 insertions(+), 17 deletions(-)
diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c
index 87c0d146..d1a3015f 100644
--- a/plugins/vddk/vddk.c
+++ b/plugins/vddk/vddk.c
@@ -51,6 +51,7 @@
#include "isaligned.h"
#include "minmax.h"
#include
2020 Aug 25
0
[nbdkit PATCH 5/5] sh, eval: Implement .default_export
...return nbdkit_add_export (exports, def, NULL);
case ERROR:
return -1;
@@ -331,6 +338,49 @@ sh_list_exports (int readonly, int default_only,
}
}
+const char *
+sh_default_export (int readonly, int is_tls)
+{
+ const char *method = "default_export";
+ const char *script = get_script (method);
+ const char *args[] = { script, method, readonly ? "true" : "false",
+ is_tls ? "true" : "false", NULL };
+ CLEANUP_FREE char *s = NULL;
+ size_t slen;
+ const char *p, *n;
+ CLEANUP_FREE char *name = NULL;
+
+ switch...
2020 Feb 25
6
[PATCH nbdkit 0/5] server: Add .get_ready callback.
I like this change. I think we were overloading the config_complete
method before to do two different things (complete configuration; do
any allocation/housekeeping necessary before we can start serving).
The only questions in my mind are whether we want this before 1.18,
and whether the name ("get_ready") is a good one.
Rich.
2020 Jul 31
0
[RFC nbdkit PATCH 4/4] sh, eval: Add .list_exports support
...rts, line, desc) == -1)
+ goto out;
+ }
+
+ ret = 0;
+
+ out:
+ if (fp)
+ fclose (fp);
+ return ret;
+}
+
+int
+sh_list_exports (int readonly, int default_only,
+ struct nbdkit_exports *exports)
+{
+ const char *method = "list_exports";
+ const char *script = get_script (method);
+ const char *args[] = { script, method, readonly ? "true" : "false",
+ default_only ? "true" : "false", NULL };
+ CLEANUP_FREE char *s = NULL;
+ size_t slen;
+
+ switch (call_read (&s, &slen, args)) {
+ case OK:...
2020 Aug 06
0
[nbdkit PATCH v2 5/5] sh, eval: Add .list_exports support
...f (nbdkit_add_export (exports, name, NULL) == -1)
+ return -1;
+ n = p + 1;
+ }
+ }
+ return 0;
+}
+
+int
+sh_list_exports (int readonly, int default_only,
+ struct nbdkit_exports *exports)
+{
+ const char *method = "list_exports";
+ const char *script = get_script (method);
+ const char *args[] = { script, method, readonly ? "true" : "false",
+ default_only ? "true" : "false", NULL };
+ CLEANUP_FREE char *s = NULL;
+ size_t slen;
+
+ switch (call_read (&s, &slen, args)) {
+ case OK:...
2020 Jun 22
4
[PATCH nbdkit 1/2] server: Add .after_fork callback, mainly for plugins to create threads.
...n;
preconnect : (bool -> unit) option;
open_connection : (bool -> 'a) option; (* required *)
diff --git a/plugins/sh/methods.h b/plugins/sh/methods.h
index f11e67e7..08a5ed17 100644
--- a/plugins/sh/methods.h
+++ b/plugins/sh/methods.h
@@ -42,6 +42,7 @@ extern const char *get_script (const char *method);
extern void sh_dump_plugin (void);
extern int sh_thread_model (void);
extern int sh_get_ready (void);
+extern int sh_after_fork (void);
extern int sh_preconnect (int readonly);
extern void *sh_open (int readonly);
extern void sh_close (void *handle);
diff --git a/plugins...
2020 Sep 21
0
[nbdkit PATCH v3 06/14] api: Add .export_description
...c b/plugins/sh/methods.c
index 12f498cd..dacb805d 100644
--- a/plugins/sh/methods.c
+++ b/plugins/sh/methods.c
@@ -456,6 +456,38 @@ sh_close (void *handle)
}
}
+const char *
+sh_export_description (void *handle)
+{
+ const char *method = "export_description";
+ const char *script = get_script (method);
+ struct sh_handle *h = handle;
+ const char *args[] = { script, method, h->h, NULL };
+ CLEANUP_FREE char *s = NULL;
+ size_t slen;
+
+ switch (call_read (&s, &slen, args)) {
+ case OK:
+ if (slen > 0 && s[slen-1] == '\n')
+ s[slen-1] = '\0...
2020 Aug 27
0
[PATCH nbdkit 2/2] api: Remove .list_exports from nbdkit 1.22 release.
...f (nbdkit_add_export (exports, name, NULL) == -1)
- return -1;
- n = p + 1;
- }
- }
- return 0;
-}
-
-int
-sh_list_exports (int readonly, int default_only,
- struct nbdkit_exports *exports)
-{
- const char *method = "list_exports";
- const char *script = get_script (method);
- const char *args[] = { script, method, readonly ? "true" : "false",
- default_only ? "true" : "false", NULL };
- CLEANUP_FREE char *s = NULL;
- size_t slen;
-
- switch (call_read (&s, &slen, args)) {
- case OK:...
2019 Mar 29
0
Wine release 4.5
...otype.map.
mshtml: Set elem_vars to NULL when detaching.
mshtml: Remove selection and range objects from document list when detaching.
mshtml: Return NULL for document not attached to window in IHTMLDocument7::get_defaultView.
mshtml: Use get_parentWindow for IHTMLDocument2::get_Script implementation.
jscript: Use parse_decimal for parsing JSON numeric literals starting with 0.
mshtml.idl: Add DispHTMLW3CComputedStyle declaration.
mshtml: Add IHTMLWindow6::get_localStorage implementation.
mshtml: Introduce new CSSStyle type as a base for different style ob...
2013 Aug 30
0
Wine release 1.7.1
...::htmlFor property implementation.
mshtml/tests: Added IHTMLLabelElement::htmlFor property tests.
wbemdisp: Register WINMGMTS object.
wbemdisp: Use wbemdisp.idl to register SWbemLocator.
wbemdisp: Added WinMGMTS object stub implementation.
mshtml: Added IHTMLDocument2::get_scripts implementation.
mshtml: Added IHTMLAnchorElement::get_hash implementation.
mshtml: Added IHTMLStyle::whiteSpace property implementation.
winedump: Improved TLB custom data handling.
widl: Include string info in tlb custom data.
widl: Increase version number stored in...
2020 Aug 27
4
[PATCH nbdkit 0/2] Temporarily remove .list_exports for nbdkit 1.22
If you're following nbdkit development upstream you'll have seen that
we are still making changes to the .list_exports and related APIs.
The current .list_exports API upstream is not how it will look
finally. The latest set of proposals was here:
https://www.redhat.com/archives/libguestfs/2020-August/thread.html#00330
At the same time I'd like to do an nbdkit 1.22 (stable) release.
2020 Jul 31
6
[RFC nbdkit PATCH 0/4] Progress towards .list_exports
This takes Rich's API proposal and starts fleshing it out with enough
meat that I was able to test 'nbdkit eval' advertising multiple
exports with descriptions paired with 'qemu-nbd --list'.
Eric Blake (3):
server: Add exports list functions
server: Prepare to use export list from plugin
sh, eval: Add .list_exports support
Richard W.M. Jones (1):
server: Implement
2008 Sep 05
0
Wine release 1.1.4
...or CertViewProperties.
crypt32: Add support for CERT_NAME_STR_REVERSE_FLAG.
crypt32/tests: Add a test for streamed, detached updates.
crypt32: Fix streamed, detached updates.
include: Add a few more things to mimeole.idl.
Jacek Caban (19):
mshtml: Added IHTMLDocument::get_Script implementation.
mshtml: Added IHTMLElement::get_parentElement implementation.
jscript: Added JSGlobal typelib.
shdocvw: Pass the right IDispatch to NavigateComplete2 and DocumentComplete.
jscript: Added IActiveScriptParse::InitNew implementation.
jscript: Added IActive...
2020 Aug 27
10
[nbdkit PATCH v2 0/8] exportname filter
This is a revision of my .default_export work, plus new work on
.export_descriptions and a new exportname filter. I think it is
now ready to check in.
Things I'd still like in 1.22:
- the file plugin should implement .list_exports (patch already posted,
but it needs rebasing on this series)
- the ext2 filter should override .list_exports when in exportname mode
- the nbd plugin should be