Skip to contentSkip to conversation

sensord: Remove leading whitespaces in empty

PATCH Applied Andre Prendel 2 participants 5 messages Mar 10, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sensord: Remove leading whitespaces in empty

Hi Jean,

as you noticed about my last patch series, there were some whitespaces in the code. Unfortunately quilt complains only about trailing whitespaces, not leading ones in empty lines. So there are some ones left.

With this patch we get rid of the remaining ones.

Andre

--

 args.c  |    8 ++++----
 chips.c |    6 +++---
 rrd.c   |   14 +++++++-------
 3 files changed, 14 insertions(+), 14 deletions(-)
prog/sensord/args.c +4 -4
diff -ur quilt-sensors/prog/sensord/args.c sensors-whitespace/prog/sensord/args.c
@@ -257,13 +257,13 @@
 			"Error: Incompatible --set and --alarm-scan.\n");
 		return -1;
 	}
-  
+
 	if (rrdFile && doSet) {
 		fprintf(stderr,
 			"Error: Incompatible --set and --rrd-file.\n");
 		return -1;
 	}
-  
+
 	if (doScan && rrdFile) {
 		fprintf(stderr,
 			"Error: Incompatible --rrd-file and --alarm-scan.\n");
@@ -275,13 +275,13 @@
 			"Error: Incompatible --rrd-cgi without --rrd-file.\n");
 		return -1;
 	}
-  
+
 	if (rrdFile && !rrdTime) {
 		fprintf(stderr,
 			"Error: Incompatible --rrd-file without --rrd-interval.\n");
 		return -1;
 	}
-  
+
 	if (!logTime && !scanTime && !rrdFile) {
 		fprintf(stderr,
 			"Error: No logging, alarm or RRD scanning.\n");
prog/sensord/chips.c +3 -3
diff -ur quilt-sensors/prog/sensord/chips.c sensors-whitespace/prog/sensord/chips.c
@@ -157,7 +157,7 @@
 	} else {
 		voltage->format = fmtVolt_2;
 	}
-  
+
 	/* terminate the list */
 	voltage->dataNumbers[pos] = -1;
 
@@ -213,7 +213,7 @@
 	} else {
 		temperature->format = fmtTemp_only;
 	}
-  
+
 	/* terminate the list */
 	temperature->dataNumbers[pos] = -1;
 
@@ -265,7 +265,7 @@
 	} else {
 		fan->format = fmtFan_only;
 	}
-  
+
 	/* terminate the list */
 	fan->dataNumbers[pos] = -1;
 
prog/sensord/rrd.c +7 -7
diff -ur quilt-sensors/prog/sensord/rrd.c sensors-whitespace/prog/sensord/rrd.c
@@ -23,7 +23,7 @@
 
 /*
  * RRD is the Round Robin Database
- * 
+ *
  * Get this package from:
  *   http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/
  *
@@ -87,7 +87,7 @@
 {
 	char *buffer = rrdLabels[index0];
 	int i, j, okay;
-  
+
 	i = 0;
 	/* contrain raw label to [A-Za-z0-9_] */
 	while ((i < RAW_LABEL_LENGTH) && rawLabel[i]) {
@@ -243,7 +243,7 @@
 {
 	int ret = 0;
 	struct stat tmp;
-  
+
 	sensorLog(LOG_DEBUG, "sensor RRD init");
 	if (stat(rrdFile, &tmp)) {
 		if (errno = ENOENT) {
@@ -252,7 +252,7 @@
 			const char *argv[6 + MAX_RRD_SENSORS] = {
 				"sensord", rrdFile, "-s", stepBuff
 			};
-      
+
 			sensorLog(LOG_INFO, "creating round robin database");
 			num = rrdGetSensors(argv + argc);
 			if (num = 0) {
@@ -286,7 +286,7 @@
 		}
 	}
 	sensorLog(LOG_DEBUG, "sensor RRD inited");
-  
+
 	return ret;
 }
 
@@ -450,7 +450,7 @@
 		}
 	}
 	sensorLog(LOG_DEBUG, "sensor rrd updated");
-  
+
 	return ret;
 }
 
@@ -480,6 +480,6 @@
 	}
 	printf("<p>\n<small><b>sensord</b> by <a href=\"mailto:[email protected]\">Merlin Hughes</a>, all credit to the <a href=\"http://www.lm-sensors.org/\">lm_sensors</a> crew.</small>\n</p>\n");
 	printf("</BODY>\n</HTML>\n");
-  
+
 	return ret;
 }

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#1 lore raw

Re: [lm-sensors] [PATCH] sensord: Remove leading whitespaces in

Quoted 5 lines · Andre Prendel

Hi Jean,

as you noticed about my last patch series, there were some whitespaces in the code. Unfortunately quilt complains only about trailing whitespaces, not leading ones in empty lines. So there are some ones left.

That's pretty strange, I pretty much thought it did for me at least at some point in time...

Quoted 1 line

With this patch we get rid of the remaining ones.

Sure, please apply.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
author Applied
#2 lore raw

Re: [lm-sensors] [PATCH] sensord: Remove leading whitespaces in

In reply to Andre Prendel
Quoted 7 lines · Jean Delvare
Quoted 5 lines · Andre Prendel

Hi Jean,

as you noticed about my last patch series, there were some whitespaces in the code. Unfortunately quilt complains only about trailing whitespaces, not leading ones in empty lines. So there are some ones left.

Quoted 6 lines

That's pretty strange, I pretty much thought it did for me at least at some point in time...

Quoted 1 line

With this patch we get rid of the remaining ones.

Sure, please apply.

Applied.

Another question for you. How can I get rid of the committed patches in quilt? Google don't give me much information about that. Once I have committed the patches, I want to remove them from the series. I want to remove them completly from quilt without unapplying the changes. What's the right approach, do you know?

Thanks
Andre

Quoted 3 lines
Signature · 2 lines
-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#3 lore raw

Re: [lm-sensors] [PATCH] sensord: Remove leading whitespaces in

In reply to Andre Prendel

Hallo Andre,

Quoted 5 lines · Andre Prendel

Another question for you. How can I get rid of the committed patches in quilt? Google don't give me much information about that. Once I have committed the patches, I want to remove them from the series. I want to remove them completly from quilt without unapplying the changes. What's the right approach, do you know?

quilt unfortunately doesn't support this operation. My own method is the following: once patches have been applied upstream, I remove them manually from patches/series, and then rm -rf .pc. Then you can delete the patch files from the patches subdirectory if you don't want to keep a copy of them.

The alternative is to pop the patch before you commit it, apply it manually (patch -p1 < patches/$(quilt next)), commit it, and the delete it (quilt delete -rn).

The lack of this functionality has been discussed on the quilt-dev mailing list some times ago. Everybody agreed if would be pretty much needed, unfortunately implementing it in a safe and clear way is not trivial, because it changes the logic from a stack-based one to a FIFO-based one. If the implementation is not crystal clear and ultra-safe it would be very easy to screw up your source tree.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#4 lore raw

Re: [lm-sensors] [PATCH] sensord: Remove leading whitespaces in

In reply to Andre Prendel
Quoted 19 lines · Jean Delvare

Hallo Andre,

Quoted 5 lines · Andre Prendel

Another question for you. How can I get rid of the committed patches in quilt? Google don't give me much information about that. Once I have committed the patches, I want to remove them from the series. I want to remove them completly from quilt without unapplying the changes. What's the right approach, do you know?

quilt unfortunately doesn't support this operation. My own method is the following: once patches have been applied upstream, I remove them manually from patches/series, and then rm -rf .pc. Then you can delete the patch files from the patches subdirectory if you don't want to keep a copy of them.

The alternative is to pop the patch before you commit it, apply it manually (patch -p1 < patches/$(quilt next)), commit it, and the delete it (quilt delete -rn).

Quoted 6 lines

The lack of this functionality has been discussed on the quilt-dev mailing list some times ago. Everybody agreed if would be pretty much needed, unfortunately implementing it in a safe and clear way is not trivial, because it changes the logic from a stack-based one to a FIFO-based one. If the implementation is not crystal clear and ultra-safe it would be very easy to screw up your source tree.

Thank you very much for this detailed explanation.

Andre

Quoted 2 lines
Signature · 1 line
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors