Displaying 20 results from an estimated 442 matches for "typ".
Did you mean:
type
2020 Jul 16
0
[PATCH vhost next 08/10] vdpa/mlx5: Add support library for mlx5 VDPA implementation
...In file included from include/linux/mlx5/driver.h:52,
from drivers/vdpa/mlx5/core/resources.c:4:
drivers/vdpa/mlx5/core/resources.c: In function 'create_uctx':
>> include/linux/mlx5/device.h:65:36: error: invalid application of 'sizeof' to incomplete type 'struct mlx5_ifc_create_uctx_out_bits'
65 | #define MLX5_ST_SZ_DW(typ) (sizeof(struct mlx5_ifc_##typ##_bits) / 32)
| ^~~~~~
drivers/vdpa/mlx5/core/resources.c:52:10: note: in expansion of macro 'MLX5_ST_SZ_DW'
52 | u32 out...
2017 Apr 25
1
[Bug #1406906] [PATCH] python: fix segmentation fault when setting non UTF-8 strings
...t a/generator/python.ml b/generator/python.ml
index 11dc48102..7d86131b1 100644
--- a/generator/python.ml
+++ b/generator/python.ml
@@ -152,12 +152,20 @@ and generate_python_structs () =
pr "PyObject *\n";
pr "guestfs_int_py_put_%s_list (struct guestfs_%s_list *%ss)\n" typ typ typ;
pr "{\n";
- pr " PyObject *list;\n";
+ pr " PyObject *list, *element;\n";
pr " size_t i;\n";
pr "\n";
pr " list = PyList_New (%ss->len);\n" typ;
- pr " for (i = 0; i < %ss->len; ++i)...
2017 Mar 18
0
[PATCH] python: check return value of Python APIs
...t a/generator/python.ml b/generator/python.ml
index 11dc48102..d03275276 100644
--- a/generator/python.ml
+++ b/generator/python.ml
@@ -152,12 +152,20 @@ and generate_python_structs () =
pr "PyObject *\n";
pr "guestfs_int_py_put_%s_list (struct guestfs_%s_list *%ss)\n" typ typ typ;
pr "{\n";
- pr " PyObject *list;\n";
+ pr " PyObject *list, *element;\n";
pr " size_t i;\n";
pr "\n";
pr " list = PyList_New (%ss->len);\n" typ;
- pr " for (i = 0; i < %ss->len; ++i)...
2018 May 03
1
[PATCH] daemon: fix memory allocation and leaks in OCaml stubs
...etions(-)
diff --git a/generator/daemon.ml b/generator/daemon.ml
index 559ed6898..265f0a475 100644
--- a/generator/daemon.ml
+++ b/generator/daemon.ml
@@ -605,16 +605,18 @@ let generate_daemon_caml_stubs () =
(* Implement code for returning structs and struct lists. *)
let emit_return_struct typ =
let struc = Structs.lookup_struct typ in
+ let uc_typ = String.uppercase_ascii typ in
pr "/* Implement RStruct (%S, _). */\n" typ;
pr "static guestfs_int_%s *\n" typ;
pr "return_%s (value retv)\n" typ;
pr "{\n";
- pr " g...
2020 Jul 16
0
[PATCH vhost next 10/10] vdpa/mlx5: Add VDPA driver for supported mlx5 devices
...r directory
7 | #include "mlx5_vdpa_ifc.h"
| ^~~~~~~~~~~~~~~~~
compilation terminated.
--
| ^~~~~~~~~~~~~
include/linux/mlx5/device.h:56:43: note: in expansion of macro '__mlx5_bit_sz'
56 | #define __mlx5_dw_bit_off(typ, fld) (32 - __mlx5_bit_sz(typ, fld) - (__mlx5_bit_off(typ, fld) & 0x1f))
| ^~~~~~~~~~~~~
include/linux/mlx5/device.h:58:60: note: in expansion of macro '__mlx5_dw_bit_off'
58 | #define __mlx5_dw_mask(typ, fld) (__mlx5_mask(typ,...
2020 Aug 05
0
[PATCH V4 linux-next 00/12] VDPA support for Mellanox ConnectX devices
...from ./include/linux/kernel.h:12,
from ./include/linux/list.h:9,
from ./include/linux/module.h:12,
from drivers/vdpa/mlx5/net/main.c:4:
drivers/vdpa/mlx5/net/main.c: In function ?required_caps_supported?:
././include/linux/compiler_types.h:129:35: error: ?struct mlx5_ifc_device_virtio_emulation_cap_bits? has no member named ?event_mode?
129 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^~~~~~~~~~~~~~~~~~
./include/uapi/linux/swab.h:115:54: note: in definition of macro ?__...
2016 Feb 24
3
[PATCH 1/3] src: generate code for printing contents of structs
...a/generator/c.ml
+++ b/generator/c.ml
@@ -1204,6 +1204,130 @@ and generate_client_structs_cleanup () =
) structs
+(* Generate structs-print.c file. *)
+and generate_client_structs_print_c () =
+ generate_header CStyle LGPLv2plus;
+
+ pr "\
+#include <config.h>
+
+#include <inttypes.h>
+
+#include \"c-ctype.h\"
+
+#include \"guestfs.h\"
+#include \"structs-print.h\"
+
+";
+
+ let write_structs =
+ List.iter (
+ fun { s_name = typ; s_cols = cols } ->
+ let needs_i =
+ List.exists (function (_, (FUUID|FBuffer))...
2020 Aug 05
0
[PATCH V4 linux-next 00/12] VDPA support for Mellanox ConnectX devices
...> > from ./include/linux/list.h:9,
> > from ./include/linux/module.h:12,
> > from drivers/vdpa/mlx5/net/main.c:4:
> > drivers/vdpa/mlx5/net/main.c: In function ?required_caps_supported?:
> > ././include/linux/compiler_types.h:129:35: error: ?struct mlx5_ifc_device_virtio_emulation_cap_bits? has no member named ?event_mode?
> > 129 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
> > | ^~~~~~~~~~~~~~~~~~
> > ./include/uapi/linux/swab.h:115:54: no...
2020 Jul 16
0
[PATCH vhost next 09/10] vdpa/mlx5: Add shared memory registration code
...i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
All warnings (new ones prefixed by >>):
include/linux/mlx5/device.h:56:43: note: in expansion of macro '__mlx5_bit_sz'
56 | #define __mlx5_dw_bit_off(typ, fld) (32 - __mlx5_bit_sz(typ, fld) - (__mlx5_bit_off(typ, fld) & 0x1f))
| ^~~~~~~~~~~~~
include/linux/mlx5/device.h:58:60: note: in expansion of macro '__mlx5_dw_bit_off'
58 | #define __mlx5_dw_mask(typ, fld) (__mlx5_mask(typ,...
2017 May 11
1
[PATCH v2] RHBZ#1406906: check return value of Python object functions
...t a/generator/python.ml b/generator/python.ml
index cf0829489..4cae24757 100644
--- a/generator/python.ml
+++ b/generator/python.ml
@@ -155,12 +155,20 @@ and generate_python_structs () =
pr "PyObject *\n";
pr "guestfs_int_py_put_%s_list (struct guestfs_%s_list *%ss)\n" typ typ typ;
pr "{\n";
- pr " PyObject *list;\n";
+ pr " PyObject *list, *element;\n";
pr " size_t i;\n";
pr "\n";
pr " list = PyList_New (%ss->len);\n" typ;
- pr " for (i = 0; i < %ss->len; ++i)...
2009 Aug 14
1
Code snippet to work out which RStruct/RStructList structs are used and how
...tions(+), 0 deletions(-)
diff --git a/src/generator.ml b/src/generator.ml
index b8f9ace..b76f502 100755
--- a/src/generator.ml
+++ b/src/generator.ml
@@ -3645,6 +3645,64 @@ let java_structs = [
"inotify_event", "INotifyEvent";
]
+(* What structs are actually returned. *)
+type rstructs_used_t = RStructOnly | RStructListOnly | RStructAndList
+
+(* Returns a list of RStruct/RStructList structs that are returned
+ * by any function. Each element of returned list is a pair:
+ *
+ * (structname, RStructOnly)
+ * == there exists function which returns RStruct (_, structna...
2017 May 09
1
[PATCH] RHBZ#1406906: check return value of Python object functions
...t a/generator/python.ml b/generator/python.ml
index cf0829489..4cae24757 100644
--- a/generator/python.ml
+++ b/generator/python.ml
@@ -155,12 +155,20 @@ and generate_python_structs () =
pr "PyObject *\n";
pr "guestfs_int_py_put_%s_list (struct guestfs_%s_list *%ss)\n" typ typ typ;
pr "{\n";
- pr " PyObject *list;\n";
+ pr " PyObject *list, *element;\n";
pr " size_t i;\n";
pr "\n";
pr " list = PyList_New (%ss->len);\n" typ;
- pr " for (i = 0; i < %ss->len; ++i)...
2017 May 06
5
[Bug 1406906] [PATCH 0/3] Fix segmentation fault in Python bindings
This series addresses the issue where non UTF8 file names in a guest image lead to libguestfs segfault with Python 3 APIs.
The core issue is the APIs are not checking the return value when constructing a new PyObject. Therefore NULL pointers are added to Python collections (lists and dictionaries) crashing the application.
Few notes regarding the comments on the previous patch.
- Added a
2012 Oct 30
5
[PATCH v3 0/5] Add symbol versioning.
This is a simpler patch series to add symbol versioning.
I have pushed patches 1-3 upstream.
Rich.
2016 Feb 03
0
Re: [PATCH 1/3] sysprep, get-kernel: explicit the Guestfs parameter
On Wed, Feb 03, 2016 at 07:28:16PM +0100, Pino Toscano wrote:
> Help the OCaml compiler by expliciting Guestfs.guestfs as type for 'g'
> in some functions.
Looks mechanical, ACK.
Does Hindley-Milner type inference have problems here? I've not seen
them in this case.
Rich.
> get-kernel/get_kernel.ml | 2 +-
> sysprep/sysprep_operation_abrt_data.ml | 2 +-...
2016 Feb 03
6
[PATCH 1/3] sysprep, get-kernel: explicit the Guestfs parameter
Help the OCaml compiler by expliciting Guestfs.guestfs as type for 'g'
in some functions.
---
get-kernel/get_kernel.ml | 2 +-
sysprep/sysprep_operation_abrt_data.ml | 2 +-
sysprep/sysprep_operation_bash_history.ml | 2 +-
sysprep/sysprep_operation_ca_certificates.ml | 2 +-
sysprep/syspre...
2009 Aug 17
2
[PATCH libguestfs] generator.ml: do not emit unused print_*_list functions
...s changed, 24 insertions(+), 12 deletions(-)
diff --git a/src/generator.ml b/src/generator.ml
index ac01a98..03dc52b 100755
--- a/src/generator.ml
+++ b/src/generator.ml
@@ -6063,6 +6063,21 @@ and generate_fish_cmds () =
pr "}\n";
pr "\n";
+ let emit_print_list_function typ =
+ pr "static void print_%s_list (struct guestfs_%s_list *%ss)\n"
+ typ typ typ;
+ pr "{\n";
+ pr " int i;\n";
+ pr "\n";
+ pr " for (i = 0; i < %ss->len; ++i) {\n" typ;
+ pr " printf (\"[%%d] = {\\n\&quo...
2012 Oct 30
7
[PATCH v2 0/7] Add symbol versioning (now working).
This rather more complex patch series adds symbol versioning (7/7
shows it in action). This works for me, tested by running old and new
virt-inspector binaries against the new library.
Rich.
2020 Jun 01
1
[PATCH] erlang: Port to libei for Erlang 23
...r atom[MAXATOMLEN];
+
+ if (ei_decode_atom (buff, index, atom) != 0) return -1;
+
+ if (atom_equals (atom, "true"))
+ *res = 1;
else
- return 0;
+ *res = 0;
+
+ return 0;
}
int
-get_int (ETERM *term)
+decode_int (const char *buff, int *index, int *res)
{
- switch (ERL_TYPE (term)) {
- case ERL_INTEGER:
- return ERL_INT_VALUE (term);
- case ERL_U_INTEGER:
- return (int) ERL_INT_UVALUE (term);
- case ERL_LONGLONG:
+ unsigned char c;
+ long l;
+ long long ll;
+
+ if (ei_decode_char (buff, index, (char *) &c) == 0) {
+ // Byte integers in Erlang are...
2020 Jul 16
0
[PATCH vhost next 09/10] vdpa/mlx5: Add shared memory registration code
...clude/linux/byteorder/generic.h:94:21: note: in expansion of macro '__cpu_to_be32'
94 | #define cpu_to_be32 __cpu_to_be32
| ^~~~~~~~~~~~~
include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~~
include/linux/mlx5/device.h:51:35: note: in expansion of macro 'offsetof'
51 | #define __mlx5_bit_off(typ, fld) (offsetof(struct mlx5_ifc_##typ##_bits, fld))
|...