search for: rstring

Displaying 20 results from an estimated 256 matches for "rstring".

Did you mean: string
2017 May 04
4
[PATCH 0/3] generator: Allow returned strings to be annotated as devices.
If we want to permit more than 255 drives to be added, then we will have to add the disks to the same virtio-scsi target using different unit (LUN) numbers. Unfortunately SCSI LUN enumeration in the Linux is not deterministic (eg. two disks with target=0, lun=[0,1] can be enumerated as /dev/sda or /dev/sdb randomly). Dealing with that will require some very complex device name translation on the
2010 Dec 03
1
ERROR: Failed to build gem native extension.
...-Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o http11.o -c http11.c http11.c: In function ?http_field?: http11.c:70: warning: format not a string literal and no format arguments http11.c:71: warning: format not a string literal and no format arguments http11.c:77: error: ?struct RString? has no member named ?ptr? http11.c:77: error: ?struct RString? has no member named ?len? http11.c: In function ?request_uri?: http11.c:102: warning: format not a string literal and no format arguments http11.c: In function ?fragment?: http11.c:113: warning: format not a string literal and no forma...
2019 Jul 25
2
[libnbd PATCH] generator: Let nbd_aio_get_direction return unsigned
...ons(-) diff --git a/generator/generator b/generator/generator index 2cd83f1..bb3a1b5 100755 --- a/generator/generator +++ b/generator/generator @@ -873,6 +873,7 @@ and ret = | RInt (* return a small int, -1 = error *) | RInt64 (* 64 bit int, -1 = error *) | RString (* return a newly allocated string, caller frees *) +| RUInt (* return a bitmask, no error possible *) and permitted_state = | Created (* can be called in the START state *) | Connecting (* can be called when connecting/handshaki...
2020 Sep 06
0
[libnbd PATCH 1/3] generator: Introduce REnum/RFlags return types
...| 13 ++++++++++++- generator/OCaml.ml | 4 ++++ generator/Python.ml | 2 ++ 6 files changed, 42 insertions(+), 15 deletions(-) diff --git a/generator/API.ml b/generator/API.ml index 962b787..bf6030f 100644 --- a/generator/API.ml +++ b/generator/API.ml @@ -66,6 +66,8 @@ and ret = | RCookie | RString | RUInt +| REnum of enum +| RFlags of flags and closure = { cbname : string; cbargs : cbarg list; @@ -442,7 +444,7 @@ test whether this is the case with L<nbd_supports_tls(3)>."; "get_tls", { default_call with - args = []; ret = RInt; + args = []; ret = R...
2008 Feb 06
2
Problem with bestfcom and old Ferrups
I have an old (1997) Best Ferrups (model FE18KVA) that I am trying to monitor for the first time, but all the Best drivers fail to communicate with it. In ups_sync() in bestuferrups.c and bestfcom.c, the "time" command is sent and a one-line response is read. However, on my UPS, that command returns the current time and then prompts for a new time setting. I worked around that by just
2006 Feb 02
5
Fwd: win32-clipboard and Unicode zero bytes
Hi all, I''m forwarding this message from Brian Marick. If you run this test script and then paste the results into a Unicode aware text editor, you''ll notice that it only prints one character instead of three. I tried changing the strlen to _tcslen and strcpy to _tcscpy, but that didn''t help. I mucked around a bit with the MultiByteToWideChar function, too, but
2007 Nov 13
1
win32-api idea - wide method first based on $KCODE
All, Currently, the Win32::API.new method will search for the function name, then the ''A'' (ANSI) name, and finally the ''W'' (Wide) name. The code looks something like this: fProc = GetProcAddress(hLibrary, TEXT(RSTRING(v_proc)->ptr)); if(!fProc){ VALUE v_ascii = rb_str_new3(v_proc); v_ascii = rb_str_cat(v_ascii, "A", 1); fProc = GetProcAddress(hLibrary, TEXT(RSTRING(v_ascii)->ptr)); if(!fProc){ VALUE v_unicode = rb_str_new3(v_proc); v_unicode = rb_str_cat(v_unicode, &quot...
2017 Apr 21
0
[PATCH 1/2] generator: Simplify the handling of string parameters.
..."val")], []; shortdesc = "define an Augeas node"; longdesc = "\ Defines a variable C<name> whose value is the result of @@ -127,7 +127,7 @@ if a node was created." }; { defaults with name = "aug_get"; added = (0, 0, 7); - style = RString "val", [String "augpath"], []; + style = RString "val", [String (PlainString, "augpath")], []; shortdesc = "look up the value of an Augeas path"; longdesc = "\ Look up the value associated with C<path>. If C<path> @@...
2017 Apr 21
4
[PATCH 0/2] generator: Simplify the handling of string parameters.
Very large but mechanical change to the generator. Rich.
2013 Jan 24
3
[REVIEW ONLY] Mountable patches
These 3 patches implement support for APIs which must accept a mountable, but don't update apis which must return mountables. Matt
2008 May 11
3
converting a RSTRING to an OLESTR
Hi, I was going to modify the TaskScheduler#save method to take an optional file name. But, I need to convert a Ruby string to an OLE string. I thought I could use this: http://msdn.microsoft.com/en-us/library/ms692615(VS.85).aspx But, it only appears to accept literal string constants. Any other suggestions? Thanks, Dan
2011 Dec 08
0
[hivex] [PATCH 2/8] generator: Add new return type to ABI: RLenValue
...(* Returns hive_node_h* or NULL. *) | RValue (* Returns hive_value_h or 0. *) | RValueList (* Returns hive_value_h* or NULL. *) + | RLenValue (* Returns offset and length of value. *) | RString (* Returns char* or NULL. *) | RStringList (* Returns char** or NULL. *) | RLenType (* See hivex_value_type. *) @@ -888,6 +889,7 @@ and generate_c_prototype ?(extern = false) name style = | RValueList -> pr...
2011 Oct 19
1
[hivex][PATCH 2/8] generator: Add new return type to ABI: RLenValue
...(* Returns hive_node_h* or NULL. *) | RValue (* Returns hive_value_h or 0. *) | RValueList (* Returns hive_value_h* or NULL. *) + | RLenValue (* Returns offset and length of value. *) | RString (* Returns char* or NULL. *) | RStringList (* Returns char** or NULL. *) | RLenType (* See hivex_value_type. *) @@ -888,6 +889,7 @@ and generate_c_prototype ?(extern = false) name style = | RValueList -> pr...
2020 Sep 06
8
[libnbd PATCH 0/3] Improve type-safety of ocaml/golang getters
Natural fallout after my recent testsuite additions that fixed a couple of ocaml bugs in the setters. However, on at least the OCaml code, I'm not sure what we should do if a newer libnbd ever returns a bit that an older NBD.mli was not expecting at the time the OCaml compiler ran (see below). I'm also not sure if there is a more efficient way to avoid outputting Val_FOO() converters for
2017 Feb 21
1
[PATCH] generator: Put all the daemon procedure numbers (proc_nr)
This is a follow-up to the other generator changes in: https://www.redhat.com/archives/libguestfs/2017-February/msg00217.html Rich.
2011 Dec 07
1
[PATCH] hivex: Fix Ruby bindings for 1.9; let the user explicitly choose ruby, rake
...p; test -n "$HAVE_LIBRUBY"]) diff --git a/generator/generator.ml b/generator/generator.ml index 065c25d..dd13d6a 100755 --- a/generator/generator.ml +++ b/generator/generator.ml @@ -3265,6 +3265,14 @@ and generate_ruby_c () = #define RARRAY_LEN(r) (RARRAY((r))->len) #endif +#ifndef RSTRING_LEN +#define RSTRING_LEN(r) (RSTRING((r))->len) +#endif + +#ifndef RSTRING_PTR +#define RSTRING_PTR(r) (RSTRING((r))->ptr) +#endif + static VALUE m_hivex; /* hivex module */ static VALUE c_hivex; /* hive_h handle */ static VALUE e_Error; /* used for all errors */ @@ -3287,8 +3295,8 @...
2020 Sep 07
2
Re: [libnbd PATCH 1/3] generator: Introduce REnum/RFlags return types
On Sat, Sep 05, 2020 at 08:40:58PM -0500, Eric Blake wrote: > diff --git a/generator/API.mli b/generator/API.mli > index 712e837..e45b5c0 100644 > --- a/generator/API.mli > +++ b/generator/API.mli > @@ -78,6 +78,8 @@ and ret = > | RString (** return a newly allocated string, > caller frees, NULL for error *) > | RUInt (** return a bitmask, no error possible *) > +| REnum of enum (** return an enum, no error possible *) > +| RFlags of flags...
2014 Feb 10
0
Patch for bestfcom driver
...0:22:35.405305828 -0800 @@ -582,6 +582,13 @@ void upsdrv_init_nofc(void) fc.type = FERRUPS; snprintf(fc.name, sizeof(fc.name), "%s", "Ferrups"); } else + /* For FE2.1KVA running 9.28 firmware and possibly older */ + if (strstr(rstring, "Model: FE2.1KVA") + || strstr(rstring, "Model: FE")){ + fc.model = FExxxx; + fc.type = FERRUPS; + snprintf(fc.name, sizeof(fc.name), "%s", "Ferrups"); + } else if (strlen(rstrin...
2020 Sep 29
2
Re: [libnbd PATCH 1/3] api: Add get_nr_meta_contexts, clear_meta_contexts
On Mon, Sep 28, 2020 at 05:05:16PM -0500, Eric Blake wrote: > + "get_meta_context", { > + default_call with > + args = [ Int "i" ]; ret = RString; Previously we have only used the Int parameter type for things which are plausibly integers (timeouts, signal numbers). This one really ought to be an unsigned or better still a size_t. Would it help if I provided a SizeT type for the generator? But in general yes this patch is obvious so ACK....
2004 Jul 31
3
Bug in new_work_item
Hi all, Windows 2000 Ruby 1.8.2 R7 VC++ 6.0 I noticed that if I try to call new_work_item and give the task a name that already exists, I get a segfault: C:\eclipse\workspace\win32-taskscheduler>ruby test.rb "0.1.0" test.rb:22:in `new_work_item'': NewWorkItem() function failed (Win32::TaskSchedul erError) from test.rb:22 test.rb:22: [BUG] Segmentation fault ruby