search for: var_valu

Displaying 20 results from an estimated 24 matches for "var_valu".

Did you mean: var_value
2017 Jun 11
2
Force casting a Value*
On 11 June 2017 at 12:05, Tim Northover <t.p.northover at gmail.com> wrote: > On 11 June 2017 at 11:56, Dipanjan Das via llvm-dev > <llvm-dev at lists.llvm.org> wrote: > > I can't pass var_value to a function accepting uint64_t. LLVM complains > > about broken function call. > > Well, yes. var_value has type "ConstantInt *", not uint64_t. Assuming > the value being stored actually is a constant known at compile-time > you should be able to use cast<ConstantI...
2017 Jun 11
2
Force casting a Value*
...http://en.cp >>> preference.com/w/cpp/language/reinterpret_cast >>> >> >> I tried cast<ConstInt>(vo), but that failed at run-time. >> > > That is not the same as reinterpret_cast<int64>(some_value_star). > None of the following work. Value* var_value = reinterpret_cast<intptr_t>(vo); Value* var_value= reinterpret_cast<uint64_t>(vo); The following worked, still didn't solve the problem: Value* var_value = reinterpret_cast<ConstantInt*>(vo); I can't pass var_value to a function accepting uint64_t. LLVM complains abou...
2017 Jun 12
2
Force casting a Value*
...s.llvm.org> wrote: > >> >> >> On 11 June 2017 at 12:05, Tim Northover <t.p.northover at gmail.com> wrote: >> >>> On 11 June 2017 at 11:56, Dipanjan Das via llvm-dev >>> <llvm-dev at lists.llvm.org> wrote: >>> > I can't pass var_value to a function accepting uint64_t. LLVM complains >>> > about broken function call. >>> >>> Well, yes. var_value has type "ConstantInt *", not uint64_t. Assuming >>> the value being stored actually is a constant known at compile-time >>> you...
2017 Jun 11
2
Force casting a Value*
On 11 June 2017 at 07:53, David Blaikie <dblaikie at gmail.com> wrote: > Sounds like you're looking for reinterpret_cast: http://en. > cppreference.com/w/cpp/language/reinterpret_cast > I tried cast<ConstInt>(vo), but that failed at run-time. > > On Sun, Jun 11, 2017 at 3:06 AM Dipanjan Das via llvm-dev < > llvm-dev at lists.llvm.org> wrote: >
2020 Apr 03
0
Powercool PCRACK-1200VA patch update
...ivers.   */ +#define USB_BUFLEN_MAX 256 +static int                langid_fix = -1; +static int                buflen_fix = -1; +  void nut_usb_addvars(void)  {      /* allow -x vendor=X, vendorid=X, product=X, productid=X, serial=X */ @@ -64,8 +69,12 @@ void nut_usb_addvars(void)      addvar(VAR_VALUE, "bus", "Regular expression to match USB bus name");      addvar(VAR_VALUE, "usb_set_altinterface", "Force redundant call to usb_set_altinterface() (value=bAlternateSetting; default=0)"); + +    addvar(VAR_VALUE, "langid_fix", "Apply the lan...
2009 Feb 04
2
[nut-commits] svn commit r1765 - in trunk: . drivers man
...uot;%04X", > ups.ShortStatus) ; > 905 dstate_setinfo("ups.time", "%02d:%02d:%02d", > p[6], p[7], p[8]) ; The above is a waste of effort. By the time upsdrv_shutdown() runs, the server won't be listening anymore. > 958 addvar(VAR_VALUE, "ups.delay.shutdown", "Override > shutdown delay (120s)"); > 959 addvar(VAR_VALUE, "ups.delay.start", "Override restart > delay (10s)"); This doesn't work without using getval() somewhere in the driver. > 971 ioctl(up...
1998 Aug 05
6
Problem with TCP_wrappers
Hi, I''m running into something weird here. I''m using RH5.1 with tcp_wrappers 7.6. The syntax for hosts.allow and hosts.deny is: <service list> : <access list> [ : <shell_command> ] Everything works when I _don''t_ use the shell_command. I used the _exact_ line as in the man-pages utilising "safe_finger" (comes with tcp_wrappers), tcpdchk
2018 Feb 04
0
[PATCH 2/3] Add generic facility to override HID report descriptor in usbhid-ups
...+++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/drivers/usbhid-ups.c b/drivers/usbhid-ups.c index 954fa54..5a4d6db 100644 --- a/drivers/usbhid-ups.c +++ b/drivers/usbhid-ups.c @@ -748,6 +748,8 @@ void upsdrv_makevartable(void) #else addvar(VAR_VALUE, "notification", "Set notification type, (ignored, only for backward compatibility)"); #endif + + addvar(VAR_VALUE, "hid_descriptor", "Replacement HID descriptor file"); } #define MAX_EVENT_NUM 32 @@ -1093,16 +1095,52 @@ static void process_boolean_info...
2012 Jan 09
1
bestups bug fix
hi all, really simple fix for the bestups driver: In function: upsdrv_makevartable() you need to add the line addvar(VAR_VALUE, "battvoltmult", "Battery voltage multiplier"); There are a number of simple improvements I could make to this driver, but I'm assuming that since the above bug has been around since nut v2.4, not many people are using this driver. Is this driver worth improving? -Sadar...
2011 Jan 25
1
[RFC] Updates to ACP smart driver
This patch introduces a handful of new options, I mentioned earlier in: http://www.mail-archive.com/nut-upsdev at lists.alioth.debian.org/msg02088.html See the large commit message in the follow-up for the details and rationale. I realize it's a bit larger diff - so if it's required I can split it into few smaller ones. Michal Soltys (1): APC smart driver update and new features.
2011 Mar 05
19
[RFC apcsmart V3 00/18] apcsmart driver updates
Sorry for a bit longer delay than I anticipated, I was stuffed with the work. This is the next iteration of the patch adding some functionality to apcsmart driver, and relying on 'ignorelb' recently added. Follow up from previous thread: http://www.mail-archive.com/nut-upsdev at lists.alioth.debian.org/msg02331.html Main differences is that V3 is split into many small patches, so the
2020 Apr 03
0
Patch to support Powercool PCRACK-1200VA
...USB_DEVICE(0x0001, 0x0000),    NULL,        "MEC0003",     &krauler_subdriver },    /* Powercool PCRACK-1200VA */      /* End of list */      { -1,    -1,    NULL,    NULL,    NULL }  }; @@ -1651,6 +1660,9 @@ void    upsdrv_makevartable(void)      nut_usb_addvars();      addvar(VAR_VALUE, "langid_fix", "Apply the language ID workaround to the krauler subdriver (0x409 or 0x4095)"); + +    addvar(VAR_VALUE, "buflen_fix", "Apply the buflen workaround to the krauler subdriver"); +  #endif    /* QX_USB */  #ifdef QX_SERIAL @@ -1822,7 +1834,8...
2006 Jun 03
1
RFC: allow HID subdriver's to register ups.conf settings
...urce, add an extra function, subdriver_extendvartable(). I'm currently working on belkin-hid.c, so it would have; void belkin_extendvartable(void) { addvar(VAR_FLAG, "wait", "Wait for AC power "); addvar(VAR_VALUE,"wait", "Wait for AC power and battery level "); /* ... */ } The other HID drivers, I guess, could simply have empty functions at the moment. Next, modify the subdriver_t chunk (again, this is shown for the belkin-hid) to be; subdriver_...
2009 Aug 14
2
Bestfortress driver, network serial patch for nut-2.0
...KNOWN; } void upsdrv_help(void) { } /* list flags and values that you want to receive via -x */ void upsdrv_makevartable(void) { /* allow '-x xyzzy' */ /* addvar(VAR_FLAG, "xyzzy", "Enable xyzzy mode"); */ /* allow '-x foo=<some value>' */ /* addvar(VAR_VALUE, "foo", "Override foo setting"); */ addvar (VAR_VALUE, "baudrate", "serial line speed"); addvar (VAR_VALUE, "max_load", "rated VA load VA"); } void upsdrv_banner(void) { printf("Network UPS Tools - Best Fortress UPS driver 0.01 (...
2018 Feb 04
5
[PATCH 0/3] OpenUPS updates
Hi, I've been checking out NUT with an OpenUPS board over the last couple of weekends, and have noticed that it doesn't seem to report sensible values. This lead me to investigate usbhid-ups and delve into various issues. As mentioned in a github issue, one of the problems is with the report descriptor - dumping this from the usbhid-ups debug output and picking through it reveals that
2011 Feb 07
4
[PATCH/RFC v2 0/3] Updates to ACP smart driver
This is 2nd version of the earlier patch featuring a few new features and fixes to the apcsmart driver, following the remarks in: http://www.mail-archive.com/nut-upsdev at lists.alioth.debian.org/msg02294.html Major changes from v1: - handle battery.charge and battery.runtime checks at main.c level - handle "immutable but writable" conflict gracefully at driver level -
2006 Jan 27
0
[PATCH] fentonups patch to make it work with some powercom ups's
...ret = ser_send(upsfd, "%c%c%c%c%c\r", 1, 2, 2, 3, 5); + ret = ser_get_line(upsfd, temp, sizeof(temp), ENDCHAR, "", + SER_WAIT_SEC, SER_WAIT_USEC); + } raw = get_id(); if (!raw) @@ -426,6 +445,7 @@ void upsdrv_help(void) void upsdrv_makevartable(void) { addvar(VAR_VALUE, "lowbattvolt", "Set low battery level, in volts"); + addvar(VAR_FLAG, "powercom", "Set signal lines for PowerCOM UPS (method straced from PowerCOM's upsmon)"); } void upsdrv_banner(void) --- nut-2.0.2/drivers/fentonups.h.orig 2005-05-04 12:36:36.000...
2006 Apr 26
1
RE nut 2.0 fentonups and Xanto S3000R
...f (raw) + free(raw); /* paranoia - cancel any shutdown that might already be running */ ret = ser_send(upsfd, "C\r"); @@ -406,6 +425,7 @@ void upsdrv_help(void) void upsdrv_makevartable(void) { + addvar(VAR_VALUE, "model", "force model"); } void upsdrv_banner(void) $OpenBSD$ --- drivers/fentonups.h.orig Tue Apr 25 23:32:16 2006 +++ drivers/fentonups.h Wed Apr 26 00:09:19 2006 @@ -81,5 +81,6 @@ struct { { "WELI 500 1.0", "Giant Pow...
2012 Jun 10
3
SNMP agent for NUT
Hello guys, I was some years ago when I sent something to this list. NUT is a great tool but lacks SNMP management. It can access a device using SNMP but I found no way to read NUT values using SNMP. It would be very useful in order to integrate with network management software based on SNMP. As I did not find a solution, I wrote it myself. I wrote a MIB file and a SNMP agent for net-snmp
2012 Jun 10
3
SNMP agent for NUT
Hello guys, I was some years ago when I sent something to this list. NUT is a great tool but lacks SNMP management. It can access a device using SNMP but I found no way to read NUT values using SNMP. It would be very useful in order to integrate with network management software based on SNMP. As I did not find a solution, I wrote it myself. I wrote a MIB file and a SNMP agent for net-snmp