Displaying 16 results from an estimated 16 matches for "get_string_list".
2018 Jan 22
2
[PATCH] lua, perl: Use thread-safe strerror_r instead of strerror (RHBZ#1536763).
...tring (L, -1);
- if (code)
- lua_pushfstring (L, \"%%s: %%s\", msg, strerror (code));
+ if (code) {
+ ignore_value (strerror_r (code, err, sizeof err));
+ lua_pushfstring (L, \"%%s: %%s\", msg, err);
+ }
else
lua_pushstring (L, msg);
@@ -640,11 +647,12 @@ get_string_list (lua_State *L, int index)
const size_t len = lua_objlen (L, index);
size_t i;
char **strs;
+ char err[128];
strs = malloc ((len+1) * sizeof (char *));
if (strs == NULL) {
- luaL_error (L, \"get_string_list: malloc failed: %%s\",
- strerror (errno));
+...
2017 May 11
1
[PATCH] python: improve few exceptions thrown on error
...71,7 @@ get_all_event_callbacks (guestfs_h *g, size_t *len_rtn)
/* Copy them into the return array. */
r = malloc (sizeof (PyObject *) * (*len_rtn));
if (r == NULL) {
- PyErr_SetNone (PyExc_MemoryError);
+ PyErr_NoMemory ();
return NULL;
}
@@ -298,7 +298,7 @@ guestfs_int_py_get_string_list (PyObject *obj)
assert (obj);
if (!PyList_Check (obj)) {
- PyErr_SetString (PyExc_RuntimeError, "expecting a list parameter");
+ PyErr_SetString (PyExc_TypeError, "expecting a list parameter");
return NULL;
}
@@ -310,7 +310,7 @@ guestfs_int_py_get_string_...
2020 Jun 01
1
[PATCH] erlang: Port to libei for Erlang 23
...;
-extern ETERM *make_error (const char *funname);
-extern ETERM *unknown_optarg (const char *funname, ETERM *optargname);
-extern ETERM *unknown_function (ETERM *fun);
-extern ETERM *make_string_list (char **r);
-extern ETERM *make_table (char **r);
-extern ETERM *make_bool (int r);
-extern char **get_string_list (ETERM *term);
-extern int get_bool (ETERM *term);
-extern int get_int (ETERM *term);
-extern int64_t get_int64 (ETERM *term);
-
/* This stops things getting out of hand, but also lets us detect
* protocol problems quickly.
*/
#define MAX_MESSAGE_SIZE (32*1024*1024)
-static unsigned char *r...
2014 Dec 10
3
[PATCH v2 0/3] Implement guestfs_add_libvirt_dom.
This completes the implementation on the libguestfs side, allowing
python-libvirt dom pointers to be passed to guestfs_add_libvirt_dom.
For context see:
https://bugzilla.redhat.com/show_bug.cgi?id=1138203#c40
https://bugzilla.redhat.com/show_bug.cgi?id=1075143
https://bugzilla.redhat.com/show_bug.cgi?id=1075164
Rich.
2015 Oct 20
3
[PATCH 1/2] generator: add a RelativePathnameList parameter type
...id *%s = ERL_BIN_PTR (%s_bin);\n" n n;
pr " size_t %s_size = ERL_BIN_SIZE (%s_bin);\n" n n
- | StringList n | DeviceList n ->
+ | StringList n | DeviceList n | RelativePathnameList n ->
pr " CLEANUP_FREE_STRING_LIST char **%s = get_string_list (ARG (%d));\n" n i
| Bool n ->
pr " int %s = get_bool (ARG (%d));\n" n i
diff --git a/generator/fish.ml b/generator/fish.ml
index 6f68e65..cfbec2a 100644
--- a/generator/fish.ml
+++ b/generator/fish.ml
@@ -376,7 +376,8 @@ Guestfish will prompt for these se...
2015 Oct 21
2
[PATCH 1/2] generator: add a FilenameList parameter type
...const void *%s = ERL_BIN_PTR (%s_bin);\n" n n;
pr " size_t %s_size = ERL_BIN_SIZE (%s_bin);\n" n n
- | StringList n | DeviceList n ->
+ | StringList n | DeviceList n | FilenameList n ->
pr " CLEANUP_FREE_STRING_LIST char **%s = get_string_list (ARG (%d));\n" n i
| Bool n ->
pr " int %s = get_bool (ARG (%d));\n" n i
diff --git a/generator/fish.ml b/generator/fish.ml
index 6f68e65..40b97d3 100644
--- a/generator/fish.ml
+++ b/generator/fish.ml
@@ -376,7 +376,8 @@ Guestfish will prompt for these se...
2014 Dec 11
4
[PATCH v3 0/4] Implement guestfs_add_libvirt_dom.
A hopefully cleaner implementation this time. It doesn't
require any special insights into how libvirt-python is
implemented. Instead, it requires a change to libvirt-python
to add a .c_pointer() method:
https://www.redhat.com/archives/libvir-list/2014-December/msg00615.html
Rich.
2014 Dec 11
6
[PATCH v4 0/6] Implement guestfs_add_libvirt_dom.
Since v3:
- Fix labelling over overlays (see 6/6)
- Tested it with a test program which simulates what virt-manager
will do. See the attachment here:
https://bugzilla.redhat.com/show_bug.cgi?id=1075164#c7
Rich.
2009 Aug 17
13
total warning-removal for daemon/
The warnings in daemon were aggravating and risky
for development (too easy to miss new ones) so I spent some
time last week and today working on removing them.
The first patch gets us down to almost no warnings with
the original -Wall setting. That was by far the hardest part.
Once I'd done that, I enabled nearly all of gcc's warnings via
gnulib's warnings and manywarnings modules
2014 Dec 10
2
[PATCH v1 0/2] Implement guestfs_add_libvirt_dom.
This is only lightly tested at the moment.
For context see:
https://bugzilla.redhat.com/show_bug.cgi?id=1138203#c40
https://bugzilla.redhat.com/show_bug.cgi?id=1075143
https://bugzilla.redhat.com/show_bug.cgi?id=1075164
Note this is not a complete fix. At least one more libguestfs patch
is required (to implement virDomainPtr in the python bindings). Plus
a virt-manager patch.
Rich.
2012 Aug 14
7
[PATCH 0/7] Add tar compress, numericowner, excludes flags.
https://bugzilla.redhat.com/show_bug.cgi?id=847880
https://bugzilla.redhat.com/show_bug.cgi?id=847881
This patch series adds various optional arguments to the tar-in and
tar-out commands.
Firstly (1/7) an optional "compress" flag is added to select
compression. This makes the calls tgz-in/tgz-out/txz-in/txz-out
deprecated, and expands the range of compression types available.
2014 Feb 10
5
[PATCH 0/4] add GUID validation (RHBZ#1008417)
Hi,
this patch serie adds a new GUID type in the generator, which would do
the same as String, but also validating (just in the C output) the
passed GUID string.
This allows to reject invalid GUIDs before passing them to low-level
tools.
Pino Toscano (4):
utils: add a function to validate a GUID string
generator: add a GUID parameter type
generator: generate code for parameter validation
2009 Aug 12
23
[PATCH 0/23] factor and const-correctness
This started as a simple warning-elimination change.
I'll get back to that series shortly ;-)
It turned into a factorization and constification exercise
during which I got a taste of ocaml. Thanks to Rich Jones
for help with a few snippets in generator.ml.
The overall result is that many previously-manually-maintained
bits from daemon/*.c functions are now hoisted into the automatically-
2017 Apr 21
0
[PATCH 1/2] generator: Simplify the handling of string parameters.
...r " const void *%s = ERL_BIN_PTR (%s_bin);\n" n n;
pr " size_t %s_size = ERL_BIN_SIZE (%s_bin);\n" n n
- | StringList n | DeviceList n | FilenameList n ->
+ | StringList (_, n) ->
pr " CLEANUP_FREE_STRING_LIST char **%s = get_string_list (ARG (%d));\n" n i
| Bool n ->
pr " int %s = get_bool (ARG (%d));\n" n i
diff --git a/generator/fish.ml b/generator/fish.ml
index c3180be35..45289132f 100644
--- a/generator/fish.ml
+++ b/generator/fish.ml
@@ -176,19 +176,16 @@ let generate_fish_run_cmds a...
2017 Apr 21
4
[PATCH 0/2] generator: Simplify the handling of string parameters.
Very large but mechanical change to the generator.
Rich.
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
...pr "))\n";
@@ -7419,11 +7419,11 @@ py_guestfs_close (PyObject *self, PyObject *args)
pr " g = get_handle (py_g);\n";
List.iter (
- function
- | String _ | FileIn _ | FileOut _ | OptString _ | Bool _ | Int _ -> ()
- | StringList n ->
- pr " %s = get_string_list (py_%s);\n" n n;
- pr " if (!%s) return NULL;\n" n
+ function
+ | String _ | FileIn _ | FileOut _ | OptString _ | Bool _ | Int _ -> ()
+ | StringList n ->
+ pr " %s = get_string_list (py_%s);\n" n n;
+ pr " if (!%...