search for: filev

Displaying 12 results from an estimated 12 matches for "filev".

Did you mean: file
2016 Apr 14
1
Re: [PATCH v2] customize/perl_edit-c.c: Don't use internal APIs.
...e, > - * as long as it's kept internal within the libguestfs sources. > - */ > -#include "../ocaml/guestfs-c.h" > - > #pragma GCC diagnostic ignored "-Wmissing-prototypes" > > value > -virt_customize_edit_file_perl (value verbosev, value gv, value filev, > - value exprv) > +virt_customize_edit_file_perl (value verbosev, value gv, value gpv, > + value filev, value exprv) > { > - CAMLparam4 (verbosev, gv, filev, exprv); > + CAMLparam5 (verbosev, gv, gpv, filev, exprv);...
2016 Apr 12
3
[PATCH v2] customize/perl_edit-c.c: Don't use internal APIs.
In v1 of this patch, there was the (small) possibility that 'g' might have been garbage collected while we were in the C function. Avoid this by passing 'g' to the function as well as the C pointer, so that 'g' is pinned as a garbage collector root [by CAMLparam5] so it cannot be collected while we're in the function. Rich.
2016 Apr 12
0
[PATCH v2] customize/perl_edit-c.c: Don't use internal APIs.
...ng errors); hopefully this should be safe, - * as long as it's kept internal within the libguestfs sources. - */ -#include "../ocaml/guestfs-c.h" - #pragma GCC diagnostic ignored "-Wmissing-prototypes" value -virt_customize_edit_file_perl (value verbosev, value gv, value filev, - value exprv) +virt_customize_edit_file_perl (value verbosev, value gv, value gpv, + value filev, value exprv) { - CAMLparam4 (verbosev, gv, filev, exprv); + CAMLparam5 (verbosev, gv, gpv, filev, exprv); int r; - guestfs_h *g = Gu...
2018 Aug 23
2
[PATCH 1/2] mltools: JSON: add json_parser_tree_parse_file
...arse (value stringv); +value virt_builder_json_parser_tree_parse_file (value stringv); static value convert_json_t (json_t *val, int level) @@ -142,3 +143,27 @@ virt_builder_json_parser_tree_parse (value stringv) CAMLreturn (rv); } + +value +virt_builder_json_parser_tree_parse_file (value filev) +{ + CAMLparam1 (filev); + CAMLlocal1 (rv); + json_t *tree; + json_error_t err; + + tree = json_load_file (String_val (filev), JSON_DECODE_ANY, &err); + if (tree == NULL) { + char buf[1024 + JSON_ERROR_TEXT_LENGTH]; + if (strlen (err.text) > 0) + snprintf (buf, sizeof buf,...
2016 Apr 11
0
[PATCH] customize/perl_edit-c.c: Don't use internal APIs.
...ly this should be safe, - * as long as it's kept internal within the libguestfs sources. - */ -#include "../ocaml/guestfs-c.h" - #pragma GCC diagnostic ignored "-Wmissing-prototypes" value @@ -43,12 +37,12 @@ virt_customize_edit_file_perl (value verbosev, value gv, value filev, { CAMLparam4 (verbosev, gv, filev, exprv); int r; - guestfs_h *g = Guestfs_val (gv); + guestfs_h *g = (guestfs_h *) Int64_val (gv); r = edit_file_perl (g, String_val (filev), String_val (exprv), NULL, Bool_val (verbosev)); if (r == -1) - guestfs_int_ocaml...
2014 Jul 30
2
[PATCH 1/3] ext2: create a struct for the OCaml 't' type
...= caml_alloc_custom (&ext2_custom_operations, - sizeof (ext2_filsys), 0, 1); - Ext2fs_val (fsv) = fs; + sizeof (struct ext2_data), 0, 1); + Ext2fs_val (fsv) = *data; CAMLreturn (fsv); } @@ -122,18 +127,18 @@ supermin_ext2fs_open (value filev) CAMLlocal1 (fsv); int fs_flags = EXT2_FLAG_RW; errcode_t err; - ext2_filsys fs; + struct ext2_data data; #ifdef EXT2_FLAG_64BITS fs_flags |= EXT2_FLAG_64BITS; #endif err = ext2fs_open (String_val (filev), fs_flags, 0, 0, - unix_io_manager, &fs); +...
2003 Apr 24
1
RMySQL crash under R 1.7.0, but not 1.6.2
...Ver: 7.0.2600.0 Offser: 00033730 indicating that the error occurs in a call to msvcrt.dll, which is the following: msvcrt.dll Image Base: 0x77c10000 Image Size: 0x00053000 CheckSum: 0x00055a85 Time Stamp: 0x3b7dfe0e Version Information Signature: feef04bd StrucVer: 000100000 FileVer: (7.0:2600.0) ProdVer: (6.1:8638.0) FlagMask: 0000003f Flags: 00000000 OS: 00040004 FileType: 00000001 SubType: 00000000 FileDate: 00000000:00000000 I have also: > version platform i386-pc-mingw32 arch i386 os...
2012 Mar 01
1
using AMI and Telnet to place calls
Hello, I am using a perl script to pull call info from a DB and place calls via telnet and AMI, all on local machine of course. My problem is that I need to capture any response from the carier, such as this taht appears in the CLI: [Mar 1 12:55:50] == Using SIP RTP CoS mark 5 [Mar 1 12:55:50] -- Got SIP response 503 "No Circuit Available" back from xxx.xxx.xxx.xxx:5060 [Mar
2019 Dec 16
4
[PATCH 0/2] Move ocaml-augeas copy to libguestfs repo
ocaml-augeas is used only by virtlibguestfs, so move it to this repository, instead of having it around in the common submodule. The removal from common will happen later. Pino Toscano (2): Bundle the ocaml-augeas library for use by libguestfs build: switch embedded copy of ocaml-augeas .gitignore | 1 + 3rdparty/ocaml-augeas/COPYING.LIB | 515
2014 Aug 28
14
[PATCH 00/13] code refactorings for tools
Hi, this series does a couple of code reorganizations/refactoring in code used by tools: the windows path handling code, and the two types of file editing (using editor, and using perl expression). There's still a code duplication between the two variants of file editing, but it is just within a single source, and can be easily solved now (planning as next step). Pino Toscano (13): edit:
2019 May 30
5
[PATCH 0/5] RFC: switch augeas APIs to OCaml
This synchronizes the embedded ocaml-augeas copy, and reimplements the augeas APIs using it (dropping all the C code). The behaviour seems unchanged, although I may have not tested all the various corner cases. Pino Toscano (5): common/mlaugeas: Synchronize with latest ocaml-augeas daemon: fix/enhance error reporting of Augeas exceptions Revert "Revert "daemon: implement
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
...-extern const char *create_kernel (const char *hostcpu, const char *kernel, const char *dtb_wildcard, const char *dtb); - -/* utils.c */ -extern void print_timestamped_message (const char *fs, ...); -extern int64_t timeval_diff (const struct timeval *x, const struct timeval *y); -extern int reverse_filevercmp (const void *p1, const void *p2); -extern void add_string (char ***argv, size_t *n_used, size_t *n_alloc, const char *str); -extern size_t count_strings (char *const *argv); -extern char **read_dir (const char *name); -extern char **filter (char **strings, int (*)(const char *)); -extern char...