Imported Upstream version 2.6.0

This commit is contained in:
arnaud.quette@free.fr 2011-01-26 10:35:08 +01:00
parent 26fb71b504
commit 459aaf9392
510 changed files with 40508 additions and 18859 deletions

View file

@ -152,6 +152,13 @@ static void do_cmd(char **argv, const int argc)
if (upscli_readline(ups, buf, sizeof(buf)) < 0) {
fatalx(EXIT_FAILURE, "Instant command failed: %s", upscli_strerror(ups));
}
/* FUTURE: status cookies will tie in here */
if (strncmp(buf, "OK", 2) != 0) {
fatalx(EXIT_FAILURE, "Unexpected response from upsd: %s", buf);
}
fprintf(stderr, "%s\n", buf);
}
static void clean_exit(void)