search for: ups_setsup

Displaying 1 result from an estimated 1 matches for "ups_setsup".

Did you mean: ups_setsuper
2009 Aug 14
2
Bestfortress driver, network serial patch for nut-2.0
...th command 'p%d=%s' */ int setparam (int parameter, int dlen, const char * data) { char reply[80]; upssend ("p%d=%*s\r", parameter, dlen, data); if (upsrecv (reply, sizeof(reply), ENDCHAR, "") < 0) return 0; return strncmp (reply, "OK", 2) == 0; } /* ups_setsuper: set super-user access (allows setting variables) */ static void ups_setsuper (int super) { setparam (999, super ? 4 : 0, super ? "2639" : ""); } /* sets whether UPS will reapply power after it has shut down and line * power returns. */ static void autorestart (int rest...