* New upstream release (Closes: #614842, #595773, #616104) - Refresh debian/patches/0001-fix_spelling_and_typo.patch - Drop debian/patches/0002-fix_libupsclient_pc.patch, applied upstream
This commit is contained in:
		
							parent
							
								
									7424f22810
								
							
						
					
					
						commit
						1b2269cf22
					
				
					 4 changed files with 32 additions and 312 deletions
				
			
		
							
								
								
									
										7
									
								
								debian/changelog
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								debian/changelog
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -1,5 +1,8 @@
 | 
			
		|||
nut (2.6.0-3) UNRELEASED; urgency=low
 | 
			
		||||
nut (2.6.1-1) UNRELEASED; urgency=low
 | 
			
		||||
 | 
			
		||||
  * New upstream release (Closes: #614842, #595773, #616104)
 | 
			
		||||
    - Refresh debian/patches/0001-fix_spelling_and_typo.patch
 | 
			
		||||
    - Drop debian/patches/0002-fix_libupsclient_pc.patch, applied upstream
 | 
			
		||||
  * Drop HAL package and build-dependencies (Closes: #613197)
 | 
			
		||||
  * debian/control:
 | 
			
		||||
    - Bump Standards-Version to 3.9.2 (no further changes)
 | 
			
		||||
| 
						 | 
				
			
			@ -8,7 +11,7 @@ nut (2.6.0-3) UNRELEASED; urgency=low
 | 
			
		|||
  * debian/rules:
 | 
			
		||||
    - Correctly pass flags to configure
 | 
			
		||||
 | 
			
		||||
 -- Laurent Bigonville <bigon@debian.org>  Mon, 09 May 2011 18:46:55 +0200
 | 
			
		||||
 -- Laurent Bigonville <bigon@debian.org>  Fri, 03 Jun 2011 10:33:00 +0200
 | 
			
		||||
 | 
			
		||||
nut (2.6.0-2) unstable; urgency=low
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										325
									
								
								debian/patches/0001-fix_spelling_and_typo.patch
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										325
									
								
								debian/patches/0001-fix_spelling_and_typo.patch
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -1,3 +1,7 @@
 | 
			
		|||
Description: Fix several spelling errors
 | 
			
		||||
Author: Laurent Bigonville <bigon@debian.org>
 | 
			
		||||
Last-Update: 2011-06-03
 | 
			
		||||
 | 
			
		||||
--- a/docs/man/bcmxcp.8
 | 
			
		||||
+++ b/docs/man/bcmxcp.8
 | 
			
		||||
@@ -103,7 +103,7 @@
 | 
			
		||||
| 
						 | 
				
			
			@ -9,309 +13,34 @@
 | 
			
		|||
 .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 @@
 | 
			
		||||
--- a/docs/man/blazer.8
 | 
			
		||||
+++ b/docs/man/blazer.8
 | 
			
		||||
@@ -264,7 +264,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
 | 
			
		||||
-There is a way to get better readings without disconnecting the load but this requires to keep track on how much (and how fast) current is going in\- and out of the battery\&. If you specified the \fBruntimecal\fR, the driver will attempt to do this\&. Note however, that this heavily relies on the values you enter and that the UPS must be able to report the load as well\&. There are quite a couple of devices that report 0 % (or any other fixed value) at all times, in which case this obviously doesn\(cqt work\&.
 | 
			
		||||
+There is a way to get better readings without disconnecting the load but this requires one to keep track on how much (and how fast) current is going in\- and out of the battery\&. If you specified the \fBruntimecal\fR, the driver will attempt to do this\&. Note however, that this heavily relies on the values you enter and that the UPS must be able to report the load as well\&. There are quite a couple of devices that report 0 % (or any other fixed value) at all times, in which case this obviously doesn\(cqt work\&.
 | 
			
		||||
 .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\&.
 | 
			
		||||
 The driver also has no way of determining the degradation of the battery capacity over time, so you\(cqll have to deal with this yourself (by adjusting the values in \fBruntimecal\fR)\&. Also note that the driver guesses the initial state of charge based on the battery voltage, so this may be less than 100 %, even when you are certain that they are full\&. There is just no way to reliably measure this between 0 and 100 % full charge\&.
 | 
			
		||||
 .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
 | 
			
		||||
 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 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.*, driver.*, ups.mfr, ups.model, ups.status
 | 
			
		||||
--- a/docs/man/metasys.8
 | 
			
		||||
+++ b/docs/man/metasys.8
 | 
			
		||||
@@ -124,7 +124,7 @@
 | 
			
		||||
--- a/docs/man/dummy-ups.8
 | 
			
		||||
+++ b/docs/man/dummy-ups.8
 | 
			
		||||
@@ -37,7 +37,7 @@
 | 
			
		||||
 This program is a multi\-purpose UPS emulation tool\&. Its behavior depends on the running mode:
 | 
			
		||||
 .SS "Dummy Mode"
 | 
			
		||||
 .sp
 | 
			
		||||
 This driver has been tested on Meta System HF Millennium 820 and ally HF 1000 only\&.
 | 
			
		||||
-\fBdummy\-ups\fR looks like a standard device driver to \fBupsd\fR(8) and allows to change any value for testing purposes\&. It is both interactive, controllable through the \fBupsrw\fR(1) and \fBupscmd\fR(1) commands (or equivalent graphical tool), and batchable through script files\&. It can be configured, launched and used as any other real driver\&. This mode is mostly useful for development and testing purposes\&.
 | 
			
		||||
+\fBdummy\-ups\fR looks like a standard device driver to \fBupsd\fR(8) and allows one to change any value for testing purposes\&. It is both interactive, controllable through the \fBupsrw\fR(1) and \fBupscmd\fR(1) commands (or equivalent graphical tool), and batchable through script files\&. It can be configured, launched and used as any other real driver\&. This mode is mostly useful for development and testing purposes\&.
 | 
			
		||||
 .SS "Repeater Mode"
 | 
			
		||||
 .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"
 | 
			
		||||
 \fBdummy\-ups\fR acts as a NUT client, simply forwarding data\&. This can be useful for supervision purposes\&. This can also allow some load sharing between several UPS instances, using a point\-to\-point communication with the UPS\&.
 | 
			
		||||
@@ -130,7 +130,7 @@
 | 
			
		||||
 .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.
 | 
			
		||||
 
 | 
			
		||||
-Any informations 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.
 | 
			
		||||
 
 | 
			
		||||
 AUTHOR
 | 
			
		||||
--- a/drivers/apcsmart.c
 | 
			
		||||
+++ b/drivers/apcsmart.c
 | 
			
		||||
@@ -324,7 +324,7 @@
 | 
			
		||||
 		/* This should never happen since we only call
 | 
			
		||||
 		   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 capabilities but said it could!");
 | 
			
		||||
 		return;
 | 
			
		||||
 	}
 | 
			
		||||
 
 | 
			
		||||
--- a/drivers/dummy-ups.c
 | 
			
		||||
+++ b/drivers/dummy-ups.c
 | 
			
		||||
@@ -375,7 +375,7 @@
 | 
			
		||||
 	 * enforcing controls! We also need a way to automate
 | 
			
		||||
 	 * the update / sync process (with cmdvartab?!) */
 | 
			
		||||
 
 | 
			
		||||
-	upsdebugx(1, "Unknown data. Commiting anyway...");
 | 
			
		||||
+	upsdebugx(1, "Unknown data. Committing anyway...");
 | 
			
		||||
 	return 1;
 | 
			
		||||
 	/* return 0;*/
 | 
			
		||||
 }
 | 
			
		||||
@@ -395,7 +395,7 @@
 | 
			
		||||
 	 * enforcing controls! We also need a way to automate
 | 
			
		||||
 	 * the update / sync process (with cmdvartab?) */
 | 
			
		||||
 
 | 
			
		||||
-	upsdebugx(1, "Unknown data. Commiting value anyway...");
 | 
			
		||||
+	upsdebugx(1, "Unknown data. Committing value anyway...");
 | 
			
		||||
 	return 1;
 | 
			
		||||
 	/* return 0;*/
 | 
			
		||||
 }
 | 
			
		||||
--- a/drivers/genericups.c
 | 
			
		||||
+++ b/drivers/genericups.c
 | 
			
		||||
@@ -142,12 +142,12 @@
 | 
			
		||||
 	 */
 | 
			
		||||
 	if ((v = getval("OL")) != NULL) {
 | 
			
		||||
 		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 overridden with %s\n", v);
 | 
			
		||||
 	}
 | 
			
		||||
 
 | 
			
		||||
 	if ((v = getval("LB")) != NULL) {
 | 
			
		||||
 		parse_input_signals(v, &upstab[upstype].line_bl, &upstab[upstype].val_bl);
 | 
			
		||||
-		upsdebugx(2, "parse_input_signals: LB overriden with %s\n", v);
 | 
			
		||||
+		upsdebugx(2, "parse_input_signals: LB overridden with %s\n", v);
 | 
			
		||||
 	}
 | 
			
		||||
 }
 | 
			
		||||
 
 | 
			
		||||
@@ -318,12 +318,12 @@
 | 
			
		||||
 	 */
 | 
			
		||||
 	if ((v = getval("CP")) != NULL) {
 | 
			
		||||
 		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 overridden with %s\n", v);
 | 
			
		||||
 	}
 | 
			
		||||
 
 | 
			
		||||
 	if ((v = getval("SD")) != NULL) {
 | 
			
		||||
 		parse_output_signals(v, &upstab[upstype].line_sd);
 | 
			
		||||
-		upsdebugx(2, "parse_output_signals: SD overriden with %s\n", v);
 | 
			
		||||
+		upsdebugx(2, "parse_output_signals: SD overridden with %s\n", v);
 | 
			
		||||
 	}
 | 
			
		||||
 
 | 
			
		||||
 	if (ioctl(upsfd, TIOCMSET, &upstab[upstype].line_norm)) {
 | 
			
		||||
--- a/drivers/metasys.c
 | 
			
		||||
+++ b/drivers/metasys.c
 | 
			
		||||
@@ -62,12 +62,12 @@
 | 
			
		||||
 
 | 
			
		||||
 /*
 | 
			
		||||
 	Metasystem UPS data transfer are made with packet of the format:
 | 
			
		||||
-	STX		DATA_LENGHT		DATA		CHECKSUM
 | 
			
		||||
+	STX		DATA_LENGTH		DATA		CHECKSUM
 | 
			
		||||
 	where:
 | 
			
		||||
 	STX is 0x02 and is the start of transmission byte
 | 
			
		||||
-	DATA_LENGHT is number of data bytes + the checksum byte
 | 
			
		||||
+	DATA_LENGTH is number of data bytes + the checksum byte
 | 
			
		||||
 	DATA ......
 | 
			
		||||
-	CHECKSUM is the sum modulus 256 of all DATA bytes + DATA_LENGHT
 | 
			
		||||
+	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
 | 
			
		||||
 	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
 | 
			
		||||
-   it's a 4 byte request (STX, LENGHT, COMMAND and CHECKSUM) */
 | 
			
		||||
+   it's a 4 byte request (STX, LENGTH, COMMAND and CHECKSUM) */
 | 
			
		||||
 void send_read_command(char command) {
 | 
			
		||||
 	int retry, sent;
 | 
			
		||||
 	unsigned char buf[4];
 | 
			
		||||
@@ -122,9 +122,9 @@
 | 
			
		||||
 	sent = 0;
 | 
			
		||||
 	while ((sent != 4) && (retry < 5)) {
 | 
			
		||||
 		buf[0]=0x02; 			/* STX Start of Transmission */
 | 
			
		||||
-		buf[1]=0x02;			/* data lenght(data + checksum byte) */
 | 
			
		||||
+		buf[1]=0x02;			/* data length(data + checksum byte) */
 | 
			
		||||
 		buf[2]=command;			/* command to send */
 | 
			
		||||
-		buf[3]=buf[1] + buf[2];	/* checksum (sum modulus 256 of data bytes + lenght) */
 | 
			
		||||
+		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...*/
 | 
			
		||||
 		sent = ser_send_buf(upsfd, buf, 4);
 | 
			
		||||
 		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 
 | 
			
		||||
    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_length) {
 | 
			
		||||
 	int i, retry, sent, checksum;
 | 
			
		||||
 	unsigned char raw_buf[255];
 | 
			
		||||
 	
 | 
			
		||||
 	/* prepares the raw data */
 | 
			
		||||
 	raw_buf[0] = 0x02;		/* STX byte */
 | 
			
		||||
-	raw_buf[1] = (unsigned char)(command_lenght + 1);		/* data lenght + checksum */
 | 
			
		||||
-	memcpy(raw_buf+2, command, command_lenght);
 | 
			
		||||
-	command_lenght += 2;
 | 
			
		||||
+	raw_buf[1] = (unsigned char)(command_length + 1);		/* data length + checksum */
 | 
			
		||||
+	memcpy(raw_buf+2, command, command_length);
 | 
			
		||||
+	command_length += 2;
 | 
			
		||||
 	
 | 
			
		||||
 	/* calculate checksum */
 | 
			
		||||
 	checksum = 0;
 | 
			
		||||
-	for (i = 1; i < command_lenght; i++) checksum += raw_buf[i];
 | 
			
		||||
+	for (i = 1; i < command_length; i++) checksum += raw_buf[i];
 | 
			
		||||
 	checksum = checksum % 256;
 | 
			
		||||
-	raw_buf[command_lenght] = (unsigned char)checksum;
 | 
			
		||||
-	command_lenght +=1;
 | 
			
		||||
+	raw_buf[command_length] = (unsigned char)checksum;
 | 
			
		||||
+	command_length +=1;
 | 
			
		||||
 	
 | 
			
		||||
 	retry = 0;
 | 
			
		||||
 	sent = 0;
 | 
			
		||||
-	while ((sent != (command_lenght)) && (retry < 5)) {
 | 
			
		||||
+	while ((sent != (command_length)) && (retry < 5)) {
 | 
			
		||||
 		if (retry == 4) send_zeros();	/* last retry is preceded by a serial reset... */
 | 
			
		||||
-		sent = ser_send_buf(upsfd, raw_buf, (command_lenght));
 | 
			
		||||
-		if (sent != (command_lenght)) printf("Error sending command %d\n", raw_buf[2]);
 | 
			
		||||
+		sent = ser_send_buf(upsfd, raw_buf, (command_length));
 | 
			
		||||
+		if (sent != (command_length)) printf("Error sending command %d\n", raw_buf[2]);
 | 
			
		||||
 		retry += 1;
 | 
			
		||||
 	}	
 | 
			
		||||
 }
 | 
			
		||||
@@ -164,8 +164,8 @@
 | 
			
		||||
 
 | 
			
		||||
 /* get the answer of a command from the ups */
 | 
			
		||||
 int get_answer(unsigned char *data) {
 | 
			
		||||
-	unsigned char my_buf[255];	/* packet has a maximum lenght of 256 bytes */
 | 
			
		||||
-	int packet_lenght, checksum, i, res;
 | 
			
		||||
+	unsigned char my_buf[255];	/* packet has a maximum length of 256 bytes */
 | 
			
		||||
+	int packet_length, checksum, i, res;
 | 
			
		||||
 	/* Read STX byte */
 | 
			
		||||
 	res = ser_get_char(upsfd, my_buf, 1, 0);
 | 
			
		||||
 	if (res < 1) {
 | 
			
		||||
@@ -176,43 +176,43 @@
 | 
			
		||||
 		ser_comm_fail("Receive error (STX): packet not on start!!\n");
 | 
			
		||||
 		return -1;	
 | 
			
		||||
 	}
 | 
			
		||||
-	/* Read data lenght byte */
 | 
			
		||||
+	/* Read data length byte */
 | 
			
		||||
 	res = ser_get_char(upsfd, my_buf, 1, 0);
 | 
			
		||||
 	if (res < 1) {
 | 
			
		||||
-		ser_comm_fail("Receive error (lenght): %d!!!\n", res);
 | 
			
		||||
+		ser_comm_fail("Receive error (length): %d!!!\n", res);
 | 
			
		||||
 		return -1;	
 | 
			
		||||
 	}
 | 
			
		||||
-	packet_lenght = my_buf[0];
 | 
			
		||||
-	if (packet_lenght < 2) {
 | 
			
		||||
-		ser_comm_fail("Receive error (lenght): packet lenght %d!!!\n", packet_lenght);
 | 
			
		||||
+	packet_length = my_buf[0];
 | 
			
		||||
+	if (packet_length < 2) {
 | 
			
		||||
+		ser_comm_fail("Receive error (length): packet length %d!!!\n", packet_length);
 | 
			
		||||
 		return -1;	
 | 
			
		||||
 	}
 | 
			
		||||
-	/* Try to read all the remainig bytes (packet_lenght) */
 | 
			
		||||
-	res = ser_get_buf_len(upsfd, my_buf, packet_lenght, 1, 0);
 | 
			
		||||
-	if (res != packet_lenght) {
 | 
			
		||||
-		ser_comm_fail("Receive error (data): got %d bytes instead of %d!!!\n", res, packet_lenght);
 | 
			
		||||
+	/* Try to read all the remainig bytes (packet_length) */
 | 
			
		||||
+	res = ser_get_buf_len(upsfd, my_buf, packet_length, 1, 0);
 | 
			
		||||
+	if (res != packet_length) {
 | 
			
		||||
+		ser_comm_fail("Receive error (data): got %d bytes instead of %d!!!\n", res, packet_length);
 | 
			
		||||
 		return -1;	
 | 
			
		||||
 	}
 | 
			
		||||
 		
 | 
			
		||||
 	/* now we have the whole answer from the ups, we can checksum it 
 | 
			
		||||
-	   checksum byte is equal to the sum modulus 256 of all the data bytes + packet_lenght 
 | 
			
		||||
+	   checksum byte is equal to the sum modulus 256 of all the data bytes + packet_length
 | 
			
		||||
 	   (no STX no checksum byte itself) */
 | 
			
		||||
-	checksum = packet_lenght;
 | 
			
		||||
-	for (i = 0; i < (packet_lenght - 1); i++) checksum += my_buf[i];  
 | 
			
		||||
+	checksum = packet_length;
 | 
			
		||||
+	for (i = 0; i < (packet_length - 1); i++) checksum += my_buf[i];  
 | 
			
		||||
 	checksum = checksum % 256;
 | 
			
		||||
-	if (my_buf[packet_lenght-1] != checksum) {
 | 
			
		||||
-		ser_comm_fail("checksum error! got %x instad of %x, received %d bytes \n", my_buf[packet_lenght - 1], checksum, packet_lenght);
 | 
			
		||||
-		dump_buffer(my_buf, packet_lenght);
 | 
			
		||||
+	if (my_buf[packet_length-1] != checksum) {
 | 
			
		||||
+		ser_comm_fail("checksum error! got %x instad of %x, received %d bytes \n", my_buf[packet_length - 1], checksum, packet_length);
 | 
			
		||||
+		dump_buffer(my_buf, packet_length);
 | 
			
		||||
 		return -1;
 | 
			
		||||
 	}
 | 
			
		||||
-	packet_lenght-=1;		/* get rid of the checksum byte */
 | 
			
		||||
-	memcpy(data, my_buf, packet_lenght);
 | 
			
		||||
-	return packet_lenght;
 | 
			
		||||
+	packet_length-=1;		/* get rid of the checksum byte */
 | 
			
		||||
+	memcpy(data, my_buf, packet_length);
 | 
			
		||||
+	return packet_length;
 | 
			
		||||
 }
 | 
			
		||||
 
 | 
			
		||||
 /* send a read 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
 | 
			
		||||
-   it returns the lenght 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 bytes_read = 0;
 | 
			
		||||
 	int retry = 0;
 | 
			
		||||
@@ -234,13 +234,13 @@
 | 
			
		||||
 
 | 
			
		||||
 /* 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
 | 
			
		||||
-   it returns the lenght of the received answer or -1 in case of failure */
 | 
			
		||||
-int command_write_sequence(unsigned char *command, int command_lenght, unsigned char *answer) {
 | 
			
		||||
+   it returns the length of the received answer or -1 in case of failure */
 | 
			
		||||
+int command_write_sequence(unsigned char *command, int command_length, unsigned char *answer) {
 | 
			
		||||
 	int bytes_read = 0;
 | 
			
		||||
 	int retry = 0;
 | 
			
		||||
 	
 | 
			
		||||
 	while ((bytes_read < 1) && (retry < 5)) {
 | 
			
		||||
-		send_write_command(command, command_lenght);
 | 
			
		||||
+		send_write_command(command, command_length);
 | 
			
		||||
 		bytes_read = get_answer(answer);
 | 
			
		||||
 		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;
 | 
			
		||||
 	}
 | 
			
		||||
 It also helps the NUT Quality Assurance effort, by automating some tests on the NUT framework\&.
 | 
			
		||||
 .sp
 | 
			
		||||
-It now offers a repeater mode\&. This will help in building the Meta UPS approach, which allows to build a virtual device, composed of several other devices (either UPS, PDUs)\&.
 | 
			
		||||
+It now offers a repeater mode\&. This will help in building the Meta UPS approach, which allows one to build a virtual device, composed of several other devices (either UPS, PDUs)\&.
 | 
			
		||||
 .SH "BUGS"
 | 
			
		||||
 .sp
 | 
			
		||||
 Instant commands are not yet supported in Dummy Mode, and data need name/value checking enforcement, as well as boundaries or enumeration definition\&.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										11
									
								
								debian/patches/0002-fix_libupsclient_pc.patch
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										11
									
								
								debian/patches/0002-fix_libupsclient_pc.patch
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -1,11 +0,0 @@
 | 
			
		|||
diff --git a/lib/libupsclient.pc.in b/lib/libupsclient.pc.in
 | 
			
		||||
index eb6826c..4ad31fb 100644
 | 
			
		||||
--- a/lib/libupsclient.pc.in
 | 
			
		||||
+++ b/lib/libupsclient.pc.in
 | 
			
		||||
@@ -9,5 +9,5 @@ nutuser=@RUN_AS_USER@
 | 
			
		||||
 Name: libupsclient
 | 
			
		||||
 Description: UPS monitoring with Network UPS Tools
 | 
			
		||||
 Version: @PACKAGE_VERSION@
 | 
			
		||||
-Libs: -L${libdir} -lupsclient @LIBSSL_LDFLAGS@
 | 
			
		||||
+Libs: -L${libdir} -lupsclient @LIBSSL_LIBS@
 | 
			
		||||
 Cflags: -I${includedir} @LIBSSL_CFLAGS@
 | 
			
		||||
							
								
								
									
										1
									
								
								debian/patches/series
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								debian/patches/series
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -1,2 +1 @@
 | 
			
		|||
0001-fix_spelling_and_typo.patch
 | 
			
		||||
0002-fix_libupsclient_pc.patch
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue