search for: cmdname

Displaying 20 results from an estimated 51 matches for "cmdname".

Did you mean: cmd_name
2008 Dec 05
4
NUT 2.0.5 and 2.2.2 hacking -- there is something to improve!
...CMDDESC shutdown.return.xx "Turn off the load after xx minute(s) and return when power is back" CMDDESC shutdown.paused.return.xxyyyy "Turn off the load after xx minute(s) and return when power is back no sooner than after yyyy minutes" */ if (!strcasecmp(cmdname, "test.battery.start")) ret = powpan_command("T\r"); if (!strcasecmp(cmdname, "test.battery.stop")) ret = powpan_command("CT\r"); if (!strcasecmp(cmdname, "beeper.on")) ret = powpan_command("C7:1\r"); if (!strcasecmp(cmdname, &...
2013 Oct 25
1
Shutdown problem with Mecer 1000VA Online UPS
.... In any case, this is actually considered to be a success by the code. This is not right. Code as follows: 418 /* 419 * If a command is invalid, it will be echoed back 420 */ 421 if (blazer_command(buf, buf, sizeof(buf)) > 0) { 422 upslogx(LOG_ERR, "instcmd: command [%s] failed", cmdname); 423 return STAT_INSTCMD_FAILED; 424 } 425 426 upslogx(LOG_INFO, "instcmd: command [%s] handled", cmdname); 427 return STAT_INSTCMD_HANDLED; As far as I understand the code line 421 tries to test for a 'comms failure' (e.g. driver disconnection) or any return string. I also su...
2013 Jul 03
1
bcmxcp: Patch for adding ups.load and battery.voltage.low
On Jul 2, 2013, at 5:16 PM, Kjell Claesson wrote: >> I hope other people can also test this. >> >> Regards >> Alf Hogemark > > Due to some crashes on the disks and lack of time I don't have the git on the > pc now. But maybe some other can commit this. I'd like to ask people to specifically try the bcmxcp branch on GitHub - it includes some changes
2007 Feb 01
2
Re: [Nut-upsuser] Ablerex 625L USB version
...own UPS immediately."); > > ! comm->send("C%c", ENDCHAR); > ! comm->send("S%02dR%04d%c%c", shutdown_delay, start_delay, ENDCHAR); > } > > > *************** > *** 581,589 **** > */ > > if (strcasecmp(cmdname, "test.battery.start.deep") == 0) { > ! ser_send_pace(upsfd, SEND_PACE, "TL%c", ENDCHAR); > > ! if (ser_get_line(upsfd, buffer, RECV_BUFFER_LEN, > ENDCHAR, IGNCHARS, READ_TIMEOUT, 0) > 0) { > upslogx(LOG_NO...
2006 May 12
1
Fwd: RE New xanto driver for NUT
Dear Andreas, some googling revealed, you created a driver for the xanto series of online-usv.de. In what state it is currently? I've to manage a S2000 and would like to use nut for it, is it usable by now? Do you need another tester? TIA, Pete
2013 Oct 24
0
Shutdown problem with Mecer 1000VA Online UPS
Hi Johan, The driver is expecting either 'ACK' or no reply at all in case of success and the command itself echoed back in case of errors. On the other hand, your UPS replies '(ACK' in case of success and '(NAK' on failure. So.. when the driver first tries to stop pending shutdowns and you get the 'operation not permitted' error, the driver interprets it as a
2020 Mar 28
0
[klibc:update-dash] dash: exec: Do not allocate stack string in padvance
...&& c != ':') flags |= CD_PRINT; diff --git a/usr/dash/exec.c b/usr/dash/exec.c index c98f14c0..04ee2ba9 100644 --- a/usr/dash/exec.c +++ b/usr/dash/exec.c @@ -118,13 +118,13 @@ shellexec(char **argv, const char *path, int idx) e = errno; } else { e = ENOENT; - while ((cmdname = padvance(&path, argv[0])) != NULL) { + while (padvance(&path, argv[0]) >= 0) { + cmdname = stackblock(); if (--idx < 0 && pathopt == NULL) { tryexec(cmdname, argv, envp); if (errno != ENOENT && errno != ENOTDIR) e = errno; } - stunalloc(c...
2013 Aug 11
1
N-Power MEV-3000LT compatibility report and problem
Hello, the code below the failing part mentions this flavor of protocol, drivers/blazer_ser.c:463 /* * If a command is invalid, it will be echoed back. * As an exception, Best UPS units will report "ACK" in case of success! */ I prepared a patch, it adds a similar check and also checks (in both occurencies) for blazer_command()<0, the latter
2013 Oct 24
2
Shutdown problem with Mecer 1000VA Online UPS
Hi, There seems to be a problem turning of the inverter on a Mecer online 1000VA UPS. OS: Debian Wheezy Nut: Installed via apt - version 2.6.4-2.3 Debug output from driver. root at proxmox1:~# /lib/nut/blazer_usb -DDDDD -a mecer -k Network UPS Tools - Megatec/Q1 protocol USB driver 0.08 (2.6.4) 0.000000 send_to_all: SETINFO driver.parameter.port "auto" 0.000023
2009 Aug 14
2
Bestfortress driver, network serial patch for nut-2.0
...ed for reliable operation */ #define SER_WAIT_SEC 2 /* allow 2.0 sec for ser_get calls */ #define SER_WAIT_USEC 0 #define ENDCHAR '\r' #define IGNCHARS " \n" #if defined(__sgi) && ! defined(__GNUC__) #define inline __inline #endif static int instcmd (const char *cmdname, const char *extra); static int upsdrv_setvar (const char *varname, const char *val); /* rated VA load if known */ static int maxload = 0; void upsdrv_initinfo(void) { dstate_setinfo("ups.mfr", "Best Power"); dstate_setinfo("ups.model", "Fortress"); dsta...
2017 Dec 15
2
Reducing code size of Position Independent Executables (PIE) by shrinking the size of dynamic relocations section
...": struct builtin_term { int bt_entry; char *bt_string; }; So the pattern makes sense. An encoding using strides will work really well here with stride == 0x10. There is another repeating pattern I noticed in vim ..9999... One of the sources behind this pattern is the "cmdnames" symbol, which is an array of "struct cmdname": struct cmdname { char_u *cmd_name; /* name of the command */ ex_func_T cmd_func; /* function for this command */ long_u cmd_argt; /* flags declared above */ int cmd_addr_type;...
2006 Dec 05
3
megatec over USB - new driver patch
...ediately."); - ser_send_pace(upsfd, SEND_PACE, "C%c", ENDCHAR); - ser_send_pace(upsfd, SEND_PACE, "S00R%04d%c", start_delay, ENDCHAR); + comm->send("C%c", ENDCHAR); + comm->send("S00R%04d%c", start_delay, ENDCHAR); } int instcmd(const char *cmdname, const char *extra) { if (strcasecmp(cmdname, "test.battery.start") == 0) { - ser_send_pace(upsfd, SEND_PACE, "C%c", ENDCHAR); - ser_send_pace(upsfd, SEND_PACE, "T%c", ENDCHAR); + comm->send("C%c", ENDCHAR); + comm->send("T%c", ENDCHAR)...
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
2017 Dec 13
2
Reducing code size of Position Independent Executables (PIE) by shrinking the size of dynamic relocations section
On Mon, Dec 11, 2017 at 6:14 PM, Roland McGrath <roland at hack.frob.com> wrote: > > On Mon, Dec 11, 2017 at 3:50 PM Rahul Chaudhry via gnu-gabi <gnu-gabi at sourceware.org> wrote: >> >> A simple combination of delta-encoding and run_length-encoding is one of the >> first schemes we experimented with (32-bit entries with 24-bit 'delta' and an >>
2008 Dec 24
1
Driver removal notification: al175
Hi Kirill, just to notify you that your al175 driver is being removed from the NUT tree, as of 2.4.0-pre1. if you wish to see it entering the tree again, please contact the Development mailing list to talk about it. Merry Christmas and happy New Year. Arnaud -- Linux / Unix Expert R&D - Eaton - http://www.eaton.com/mgeops Network UPS Tools (NUT) Project Leader -
2014 Apr 22
3
[PATCH 1/2] builder: add an optional suffix string for INI parsing errors
...context->error_suffix ? context->error_suffix : ""); } int diff --git a/builder/index-parser-c.c b/builder/index-parser-c.c index 5dcc82f..099bdf8 100644 --- a/builder/index-parser-c.c +++ b/builder/index-parser-c.c @@ -46,7 +46,7 @@ extern void unix_error (int errcode, char * cmdname, value arg) Noreturn; extern int do_parse (struct parse_context *context, FILE *in); value -virt_builder_parse_index (value progv, value filenamev) +virt_builder_parse_index (value progv, value error_suffixv, value filenamev) { CAMLparam2 (progv, filenamev); CAMLlocal5 (rv, v, sv, sv2, f...
2004 Oct 20
1
throttle particular client ip
I know this will be trivial for most, but I am having trouble with getting my scenario to work correctly. I want to ''tag'' and ''throttle'' the bandwidth to and from a particular client on my lan side. Better yet, I just want to throttle smtp traffic, per say, for that ip. ----lan----------eth1-[linux.box]-eth0----------internet I have used the technique
2006 Jul 24
2
fentonups driver patch for Effekta MHD3000 UPS
...hrglow; chrgrange = mtab2[i].chrgrange; cap_upstemp = mtab2[i].has_temp; + is_online = mtab2[i].is_online; dstate_setinfo("input.transfer.low", "%d", mtab2[i].lowxfer); *************** *** 121,126 **** --- 136,143 ---- int ret; if (!strcasecmp(cmdname, "test.battery.start")) { + sendcr_and_clear_buf(); + ret = ser_send(upsfd, "T\r"); if (ret != 2) *************** *** 130,135 **** --- 147,154 ---- } if (!strcasecmp(cmdname, "test.battery.stop")) { + sendcr_and_clear_buf(); + ret = ser_se...
2015 Apr 17
0
[ANNOUNCE] setxkbmap 1.3.1
...fied keyboard to use the layout determined by the options listed on the command line. Alan Coopersmith (7): Move global rules variable into applyRules, the only function that uses it Make len a size_t instead of converting back & forth to an int Use C99 struct initializer for cmdNames in applyComponentNames config: Add missing AC_CONFIG_SRCDIR configure: Drop AM_MAINTAINER_MODE autogen.sh: Honor NOCONFIGURE=1 setxkbmap 1.3.1 Benno Schulenberg (2): Printing the program's version number on -version. Fixing a small mistake in the man page -...
2013 Aug 11
0
N-Power MEV-3000LT compatibility report and problem
...em. From the source, drivers/blazer.c:418 /* * If a command is invalid, it will be echoed back */ if (blazer_command(buf, buf, sizeof(buf)) > 0) { upslogx(LOG_ERR, "instcmd: command [%s] failed", cmdname); return STAT_INSTCMD_FAILED; } I see the following differences from the protocol implemented in the driver. 1. Instead of echoing back the command on failure, the UPS does the following: a. Returns " \r" (space, then CR) if the command was not r...