d/p/0001-fix_spelling_and_typo.patch: Update and refresh
This commit is contained in:
parent
8aa07bb6f9
commit
facb367831
2 changed files with 319 additions and 251 deletions
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -1,8 +1,9 @@
|
||||||
nut (2.6.0-2) UNRELEASED; urgency=low
|
nut (2.6.0-2) UNRELEASED; urgency=low
|
||||||
|
|
||||||
* debian/nut-snmp.docs: Distribute snmp.txt doc file (Closes: #548295)
|
* debian/nut-snmp.docs: Distribute snmp.txt doc file (Closes: #548295)
|
||||||
|
* d/p/0001-fix_spelling_and_typo.patch: Update and refresh
|
||||||
|
|
||||||
-- Laurent Bigonville <bigon@debian.org> Wed, 02 Mar 2011 14:51:38 +0100
|
-- Laurent Bigonville <bigon@debian.org> Wed, 02 Mar 2011 15:23:18 +0100
|
||||||
|
|
||||||
nut (2.6.0-1) unstable; urgency=low
|
nut (2.6.0-1) unstable; urgency=low
|
||||||
|
|
||||||
|
|
167
debian/patches/0001-fix_spelling_and_typo.patch
vendored
167
debian/patches/0001-fix_spelling_and_typo.patch
vendored
|
@ -1,72 +1,93 @@
|
||||||
--- a/docs/man/dummy-ups.txt (revision 2722)
|
--- a/docs/man/bcmxcp.8
|
||||||
+++ b/docs/man/dummy-ups.txt (revision 2882)
|
+++ b/docs/man/bcmxcp.8
|
||||||
@@ -56,5 +56,5 @@
|
@@ -103,7 +103,7 @@
|
||||||
|
.RE
|
||||||
|
.SH "TODO LIST"
|
||||||
|
.PP
|
||||||
|
-Report UPS statistics informations
|
||||||
|
+Report UPS statistics information
|
||||||
|
.RS 4
|
||||||
|
BCM/XCP supports reporting of UPS statistics data\&.
|
||||||
|
.RE
|
||||||
|
--- a/docs/man/dummy-ups.8
|
||||||
|
+++ b/docs/man/dummy-ups.8
|
||||||
|
@@ -63,7 +63,7 @@
|
||||||
|
.RE
|
||||||
|
.\}
|
||||||
|
.sp
|
||||||
|
-This file is generally named "something\&.dev"\&. It contains a list of all valid data and associated values, and has the same format as an \fBupsc\fR(8) dump (<varname>: <value>)\&. So you can easilly create definition files from an existing UPS using "upsc > file\&.dev"\&. It can also be empty, in which case only a basic set of data is available: device\&.\fB, driver\&.\fR, ups\&.mfr, ups\&.model, ups\&.status
|
||||||
|
+This file is generally named "something\&.dev"\&. It contains a list of all valid data and associated values, and has the same format as an \fBupsc\fR(8) dump (<varname>: <value>)\&. So you can easily create definition files from an existing UPS using "upsc > file\&.dev"\&. It can also be empty, in which case only a basic set of data is available: device\&.\fB, driver\&.\fR, ups\&.mfr, ups\&.model, ups\&.status
|
||||||
|
.sp
|
||||||
|
Samples definition files are available in the "data" directory of the nut source tree, and generally in the sysconfig directory of your system distribution\&.
|
||||||
|
.sp
|
||||||
|
--- a/docs/man/dummy-ups.txt
|
||||||
|
+++ b/docs/man/dummy-ups.txt
|
||||||
|
@@ -55,7 +55,7 @@
|
||||||
|
|
||||||
This file is generally named "something.dev". It contains a list of all
|
This file is generally named "something.dev". It contains a list of all
|
||||||
valid data and associated values, and has the same format as an linkman:upsc[8]
|
valid data and associated values, and has the same format as an linkman:upsc[8]
|
||||||
-dump (<varname>: <value>). So you can easilly create definition
|
-dump (<varname>: <value>). So you can easilly create definition
|
||||||
+dump (<varname>: <value>). So you can easily create definition
|
+dump (<varname>: <value>). So you can easily create definition
|
||||||
files from an existing UPS using "upsc > file.dev".
|
files from an existing UPS using "upsc > file.dev".
|
||||||
It can also be empty, in which case only a basic set of data is available:
|
It can also be empty, in which case only a basic set of data is available:
|
||||||
--- a/docs/man/metasys.txt (revision 2722)
|
device.*, driver.*, ups.mfr, ups.model, ups.status
|
||||||
+++ b/docs/man/metasys.txt (revision 2882)
|
--- a/docs/man/metasys.8
|
||||||
@@ -45,5 +45,5 @@
|
+++ b/docs/man/metasys.8
|
||||||
|
@@ -124,7 +124,7 @@
|
||||||
|
.sp
|
||||||
|
This driver has been tested on Meta System HF Millennium 820 and ally HF 1000 only\&.
|
||||||
|
.sp
|
||||||
|
-Any informations about the use of the driver with the other listed UPS are really welcome\&.
|
||||||
|
+Any information about the use of the driver with the other listed UPS are really welcome\&.
|
||||||
|
.SH "AUTHOR"
|
||||||
|
.sp
|
||||||
|
Fabio Di Niro <blaxwan@users\&.sourceforge\&.net>
|
||||||
|
--- a/docs/man/metasys.txt
|
||||||
|
+++ b/docs/man/metasys.txt
|
||||||
|
@@ -44,7 +44,7 @@
|
||||||
|
This driver has been tested on Meta System HF Millennium 820 and
|
||||||
ally HF 1000 only.
|
ally HF 1000 only.
|
||||||
|
|
||||||
-Any informations about the use of the driver with the other listed
|
-Any informations about the use of the driver with the other listed
|
||||||
+Any information about the use of the driver with the other listed
|
+Any information about the use of the driver with the other listed
|
||||||
UPS are really welcome.
|
UPS are really welcome.
|
||||||
|
|
||||||
--- a/drivers/apcsmart.c (revision 2596)
|
AUTHOR
|
||||||
+++ b/drivers/apcsmart.c (revision 2882)
|
--- a/drivers/apcsmart.c
|
||||||
@@ -325,5 +325,5 @@
|
+++ b/drivers/apcsmart.c
|
||||||
|
@@ -324,7 +324,7 @@
|
||||||
|
/* This should never happen since we only call
|
||||||
this if the REQ_CAPABILITIES command is supported
|
this if the REQ_CAPABILITIES command is supported
|
||||||
*/
|
*/
|
||||||
- upslogx(LOG_ERR, "ERROR: APC cannot do capabilites but said it could!");
|
- upslogx(LOG_ERR, "ERROR: APC cannot do capabilites but said it could!");
|
||||||
+ upslogx(LOG_ERR, "ERROR: APC cannot do capabilities but said it could!");
|
+ upslogx(LOG_ERR, "ERROR: APC cannot do capabilities but said it could!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
--- a/drivers/dummy-ups.c (revision 2699)
|
|
||||||
+++ b/drivers/dummy-ups.c (revision 2882)
|
--- a/drivers/dummy-ups.c
|
||||||
@@ -376,5 +376,5 @@
|
+++ b/drivers/dummy-ups.c
|
||||||
|
@@ -375,7 +375,7 @@
|
||||||
|
* enforcing controls! We also need a way to automate
|
||||||
* the update / sync process (with cmdvartab?!) */
|
* the update / sync process (with cmdvartab?!) */
|
||||||
|
|
||||||
- upsdebugx(1, "Unknown data. Commiting anyway...");
|
- upsdebugx(1, "Unknown data. Commiting anyway...");
|
||||||
+ upsdebugx(1, "Unknown data. Committing anyway...");
|
+ upsdebugx(1, "Unknown data. Committing anyway...");
|
||||||
return 1;
|
return 1;
|
||||||
/* return 0;*/
|
/* return 0;*/
|
||||||
@@ -396,5 +396,5 @@
|
}
|
||||||
|
@@ -395,7 +395,7 @@
|
||||||
|
* enforcing controls! We also need a way to automate
|
||||||
* the update / sync process (with cmdvartab?) */
|
* the update / sync process (with cmdvartab?) */
|
||||||
|
|
||||||
- upsdebugx(1, "Unknown data. Commiting value anyway...");
|
- upsdebugx(1, "Unknown data. Commiting value anyway...");
|
||||||
+ upsdebugx(1, "Unknown data. Committing value anyway...");
|
+ upsdebugx(1, "Unknown data. Committing value anyway...");
|
||||||
return 1;
|
return 1;
|
||||||
/* return 0;*/
|
/* return 0;*/
|
||||||
--- a/drivers/snmp-ups.c (revision 2757)
|
}
|
||||||
+++ b/drivers/snmp-ups.c (revision 2882)
|
--- a/drivers/genericups.c
|
||||||
@@ -485,5 +485,5 @@
|
+++ b/drivers/genericups.c
|
||||||
break;
|
@@ -142,12 +142,12 @@
|
||||||
default:
|
*/
|
||||||
- upslogx(LOG_ERR, "[%s] unhandled ASN 0x%x recieved from %s",
|
|
||||||
+ upslogx(LOG_ERR, "[%s] unhandled ASN 0x%x received from %s",
|
|
||||||
upsname?upsname:device_name, pdu->variables->type, OID);
|
|
||||||
return FALSE;
|
|
||||||
@@ -525,5 +525,5 @@
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
- upslogx(LOG_ERR, "[%s] unhandled ASN 0x%x recieved from %s",
|
|
||||||
+ upslogx(LOG_ERR, "[%s] unhandled ASN 0x%x received from %s",
|
|
||||||
upsname?upsname:device_name, pdu->variables->type, OID);
|
|
||||||
return FALSE;
|
|
||||||
@@ -1460,5 +1460,5 @@
|
|
||||||
upslogx(LOG_ERR, "su_setvar: cannot set value %s for %s", arg[4], arg[3]);
|
|
||||||
else
|
|
||||||
- upsdebugx(1, "su_setvar: sucessfully set %s to \"%s\"", arg[0], arg[4]);
|
|
||||||
+ upsdebugx(1, "su_setvar: successfully set %s to \"%s\"", arg[0], arg[4]);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
--- a/drivers/genericups.c (revision 2336)
|
|
||||||
+++ b/drivers/genericups.c (revision 2882)
|
|
||||||
@@ -143,10 +143,10 @@
|
|
||||||
if ((v = getval("OL")) != NULL) {
|
if ((v = getval("OL")) != NULL) {
|
||||||
parse_input_signals(v, &upstab[upstype].line_ol, &upstab[upstype].val_ol);
|
parse_input_signals(v, &upstab[upstype].line_ol, &upstab[upstype].val_ol);
|
||||||
- upsdebugx(2, "parse_input_signals: OL overriden with %s\n", v);
|
- upsdebugx(2, "parse_input_signals: OL overriden with %s\n", v);
|
||||||
|
@ -79,7 +100,9 @@
|
||||||
+ upsdebugx(2, "parse_input_signals: LB overridden with %s\n", v);
|
+ upsdebugx(2, "parse_input_signals: LB overridden with %s\n", v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -319,10 +319,10 @@
|
|
||||||
|
@@ -318,12 +318,12 @@
|
||||||
|
*/
|
||||||
if ((v = getval("CP")) != NULL) {
|
if ((v = getval("CP")) != NULL) {
|
||||||
parse_output_signals(v, &upstab[upstype].line_norm);
|
parse_output_signals(v, &upstab[upstype].line_norm);
|
||||||
- upsdebugx(2, "parse_output_signals: CP overriden with %s\n", v);
|
- upsdebugx(2, "parse_output_signals: CP overriden with %s\n", v);
|
||||||
|
@ -92,9 +115,11 @@
|
||||||
+ upsdebugx(2, "parse_output_signals: SD overridden with %s\n", v);
|
+ upsdebugx(2, "parse_output_signals: SD overridden with %s\n", v);
|
||||||
}
|
}
|
||||||
|
|
||||||
--- a/drivers/metasys.c (revision 2601)
|
if (ioctl(upsfd, TIOCMSET, &upstab[upstype].line_norm)) {
|
||||||
+++ b/drivers/metasys.c (revision 2882)
|
--- a/drivers/metasys.c
|
||||||
@@ -63,10 +63,10 @@
|
+++ b/drivers/metasys.c
|
||||||
|
@@ -62,12 +62,12 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Metasystem UPS data transfer are made with packet of the format:
|
Metasystem UPS data transfer are made with packet of the format:
|
||||||
- STX DATA_LENGHT DATA CHECKSUM
|
- STX DATA_LENGHT DATA CHECKSUM
|
||||||
|
@ -108,14 +133,18 @@
|
||||||
+ CHECKSUM is the sum modulus 256 of all DATA bytes + DATA_LENGTH
|
+ CHECKSUM is the sum modulus 256 of all DATA bytes + DATA_LENGTH
|
||||||
|
|
||||||
The answer from the UPS have the same packet format and the first
|
The answer from the UPS have the same packet format and the first
|
||||||
@@ -115,5 +115,5 @@
|
data byte is equal to the command that the ups is answering to
|
||||||
|
@@ -114,7 +114,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
/* send a read command to the UPS, it retries 5 times before give up
|
/* send a read command to the UPS, it retries 5 times before give up
|
||||||
- it's a 4 byte request (STX, LENGHT, COMMAND and CHECKSUM) */
|
- it's a 4 byte request (STX, LENGHT, COMMAND and CHECKSUM) */
|
||||||
+ it's a 4 byte request (STX, LENGTH, COMMAND and CHECKSUM) */
|
+ it's a 4 byte request (STX, LENGTH, COMMAND and CHECKSUM) */
|
||||||
void send_read_command(char command) {
|
void send_read_command(char command) {
|
||||||
int retry, sent;
|
int retry, sent;
|
||||||
@@ -123,7 +123,7 @@
|
unsigned char buf[4];
|
||||||
|
@@ -122,9 +122,9 @@
|
||||||
|
sent = 0;
|
||||||
while ((sent != 4) && (retry < 5)) {
|
while ((sent != 4) && (retry < 5)) {
|
||||||
buf[0]=0x02; /* STX Start of Transmission */
|
buf[0]=0x02; /* STX Start of Transmission */
|
||||||
- buf[1]=0x02; /* data lenght(data + checksum byte) */
|
- buf[1]=0x02; /* data lenght(data + checksum byte) */
|
||||||
|
@ -125,14 +154,16 @@
|
||||||
+ buf[3]=buf[1] + buf[2]; /* checksum (sum modulus 256 of data bytes + length) */
|
+ buf[3]=buf[1] + buf[2]; /* checksum (sum modulus 256 of data bytes + length) */
|
||||||
if (retry == 4) send_zeros(); /* last retry is preceded by a serial reset...*/
|
if (retry == 4) send_zeros(); /* last retry is preceded by a serial reset...*/
|
||||||
sent = ser_send_buf(upsfd, buf, 4);
|
sent = ser_send_buf(upsfd, buf, 4);
|
||||||
@@ -135,5 +135,5 @@
|
retry += 1;
|
||||||
|
@@ -134,29 +134,29 @@
|
||||||
|
/* send a write command to the UPS, the write command and the value to be written are passed
|
||||||
with a char* buffer
|
with a char* buffer
|
||||||
it retries 5 times before give up */
|
it retries 5 times before give up */
|
||||||
-void send_write_command(unsigned char *command, int command_lenght) {
|
-void send_write_command(unsigned char *command, int command_lenght) {
|
||||||
+void send_write_command(unsigned char *command, int command_length) {
|
+void send_write_command(unsigned char *command, int command_length) {
|
||||||
int i, retry, sent, checksum;
|
int i, retry, sent, checksum;
|
||||||
unsigned char raw_buf[255];
|
unsigned char raw_buf[255];
|
||||||
@@ -141,21 +141,21 @@
|
|
||||||
/* prepares the raw data */
|
/* prepares the raw data */
|
||||||
raw_buf[0] = 0x02; /* STX byte */
|
raw_buf[0] = 0x02; /* STX byte */
|
||||||
- raw_buf[1] = (unsigned char)(command_lenght + 1); /* data lenght + checksum */
|
- raw_buf[1] = (unsigned char)(command_lenght + 1); /* data lenght + checksum */
|
||||||
|
@ -163,7 +194,9 @@
|
||||||
+ if (sent != (command_length)) printf("Error sending command %d\n", raw_buf[2]);
|
+ if (sent != (command_length)) printf("Error sending command %d\n", raw_buf[2]);
|
||||||
retry += 1;
|
retry += 1;
|
||||||
}
|
}
|
||||||
@@ -165,6 +165,6 @@
|
}
|
||||||
|
@@ -164,8 +164,8 @@
|
||||||
|
|
||||||
/* get the answer of a command from the ups */
|
/* get the answer of a command from the ups */
|
||||||
int get_answer(unsigned char *data) {
|
int get_answer(unsigned char *data) {
|
||||||
- unsigned char my_buf[255]; /* packet has a maximum lenght of 256 bytes */
|
- unsigned char my_buf[255]; /* packet has a maximum lenght of 256 bytes */
|
||||||
|
@ -172,7 +205,9 @@
|
||||||
+ int packet_length, checksum, i, res;
|
+ int packet_length, checksum, i, res;
|
||||||
/* Read STX byte */
|
/* Read STX byte */
|
||||||
res = ser_get_char(upsfd, my_buf, 1, 0);
|
res = ser_get_char(upsfd, my_buf, 1, 0);
|
||||||
@@ -177,41 +177,41 @@
|
if (res < 1) {
|
||||||
|
@@ -176,43 +176,43 @@
|
||||||
|
ser_comm_fail("Receive error (STX): packet not on start!!\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
- /* Read data lenght byte */
|
- /* Read data lenght byte */
|
||||||
|
@ -233,7 +268,9 @@
|
||||||
+ it returns the length of the received answer or -1 in case of failure */
|
+ it returns the length of the received answer or -1 in case of failure */
|
||||||
int command_read_sequence(unsigned char command, unsigned char *data) {
|
int command_read_sequence(unsigned char command, unsigned char *data) {
|
||||||
int bytes_read = 0;
|
int bytes_read = 0;
|
||||||
@@ -235,11 +235,11 @@
|
int retry = 0;
|
||||||
|
@@ -234,13 +234,13 @@
|
||||||
|
|
||||||
/* send a write command and try get the answer, if something fails, it retries (5 times max)
|
/* send a write command and try get the answer, if something fails, it retries (5 times max)
|
||||||
if it is on the 4th or 5th retry, it will flush the serial before sending commands
|
if it is on the 4th or 5th retry, it will flush the serial before sending commands
|
||||||
- it returns the lenght of the received answer or -1 in case of failure */
|
- it returns the lenght of the received answer or -1 in case of failure */
|
||||||
|
@ -248,3 +285,33 @@
|
||||||
+ send_write_command(command, command_length);
|
+ send_write_command(command, command_length);
|
||||||
bytes_read = get_answer(answer);
|
bytes_read = get_answer(answer);
|
||||||
if (retry > 2) ser_flush_in(upsfd, "", 0);
|
if (retry > 2) ser_flush_in(upsfd, "", 0);
|
||||||
|
retry += 1;
|
||||||
|
--- a/drivers/snmp-ups.c
|
||||||
|
+++ b/drivers/snmp-ups.c
|
||||||
|
@@ -484,7 +484,7 @@
|
||||||
|
len = snprintf(buf, buf_len, "%ld", *pdu->variables->val.integer / 100);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
- upslogx(LOG_ERR, "[%s] unhandled ASN 0x%x recieved from %s",
|
||||||
|
+ upslogx(LOG_ERR, "[%s] unhandled ASN 0x%x received from %s",
|
||||||
|
upsname?upsname:device_name, pdu->variables->type, OID);
|
||||||
|
return FALSE;
|
||||||
|
break;
|
||||||
|
@@ -524,7 +524,7 @@
|
||||||
|
value = *pdu->variables->val.integer / 100;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
- upslogx(LOG_ERR, "[%s] unhandled ASN 0x%x recieved from %s",
|
||||||
|
+ upslogx(LOG_ERR, "[%s] unhandled ASN 0x%x received from %s",
|
||||||
|
upsname?upsname:device_name, pdu->variables->type, OID);
|
||||||
|
return FALSE;
|
||||||
|
break;
|
||||||
|
@@ -1459,7 +1459,7 @@
|
||||||
|
if (ret == FALSE)
|
||||||
|
upslogx(LOG_ERR, "su_setvar: cannot set value %s for %s", arg[4], arg[3]);
|
||||||
|
else
|
||||||
|
- upsdebugx(1, "su_setvar: sucessfully set %s to \"%s\"", arg[0], arg[4]);
|
||||||
|
+ upsdebugx(1, "su_setvar: successfully set %s to \"%s\"", arg[0], arg[4]);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue