Imported Upstream version 2.6.2

This commit is contained in:
Arnaud Quette 2011-09-29 20:14:46 +02:00
parent a367d9bc54
commit 45043b58d0
246 changed files with 18228 additions and 1415 deletions

View file

@ -75,6 +75,7 @@ static const struct {
{ "megatec", "Q1\r", "F\r", "I\r" },
{ "mustek", "QS\r", "F\r", "I\r" },
{ "megatec/old", "D\r", "F\r", "I\r" },
{ "zinto", "Q1\r", "F\r", "FW?\r" },
{ NULL }
};
@ -472,6 +473,8 @@ void blazer_makevartable(void)
addvar(VAR_FLAG, "norating", "Skip reading rating information from UPS");
addvar(VAR_FLAG, "novendor", "Skip reading vendor information from UPS");
addvar(VAR_FLAG, "protocol", "Preselect communication protocol (skip autodetection)");
}
@ -594,12 +597,18 @@ static void blazer_initbattery(void)
void blazer_initinfo(void)
{
const char *protocol = getval("protocol");
int retry;
for (proto = 0; command[proto].status; proto++) {
int ret;
if (protocol && strcasecmp(protocol, command[proto].name)) {
upsdebugx(2, "Skipping %s protocol...", command[proto].name);
continue;
}
upsdebugx(2, "Trying %s protocol...", command[proto].name);
for (retry = 1; retry <= MAXTRIES; retry++) {