Displaying 3 results from an estimated 3 matches for "l_valu".
Did you mean:
l_val
2000 Mar 25
0
replacement putenv()
...e platforms don't even support putenv()
** So therefor we need a real setenv().
*/
int
setenv(name, value, rewrite)
register const char *name;
register const char *value;
int rewrite;
{
extern char **environ;
static int alloced; /* if allocated space before */
register char *C;
int l_value, offset;
char *__findenv();
if (*value == '=') /* no `=' in value */
++value;
l_value = strlen(value);
if ((C = __findenv(name, &offset))) { /* find if already exists */
if (!rewrite)
return (0);
if (strlen(C) >= l_value) { /* old larger; copy over */
while (*...
2008 Jul 10
2
[PATCH] tripplite driver updates
...n i;
+ ret = i;
+out:
+ ser_flush_io(upsfd);
+ return ret;
}
static void ups_sync(void)
@@ -301,14 +285,17 @@ void upsdrv_initinfo(void)
int va;
long w, l;
-
/* Detect the UPS or die. */
ups_sync();
- send_cmd(":W\r", w_value, sizeof w_value);
- send_cmd(":L\r", l_value, sizeof l_value);
- send_cmd(":V\r", v_value, sizeof v_value);
- send_cmd(":X\r", x_value, sizeof x_value);
+ while (send_cmd(":W\r", w_value, sizeof w_value) < 1)
+ sleep(1);
+ while (send_cmd(":L\r", l_value, sizeof l_value) < 1)
+ sleep(1);...
2006 Oct 11
2
Adding TrippLite SMART550 / Protocol 2001 Support
...LITE_OMNIVS2 ) {
ret = send_cmd(b_msg, sizeof(b_msg), b_value, sizeof(b_value));
if(ret <= 0) {
dstate_datastale();
@@ -1037,6 +1079,7 @@
switch(tl_model) {
case TRIPP_LITE_OMNIVS:
+ case TRIPP_LITE_OMNIVS2:
dstate_setinfo("output.voltage", "%.1f", hex2d(l_value+1, 4)/2.0);
break;
case TRIPP_LITE_SMARTPRO:
@@ -1047,7 +1090,7 @@
break;
}
- if(tl_model != TRIPP_LITE_OMNIVS) {
+ if(tl_model != TRIPP_LITE_OMNIVS && tl_model != TRIPP_LITE_OMNIVS2) {
debug_message("D", 2);
debug_message("V", 2);