Ok, if this is one I just sent, that makes no sense; git does not report whitepace errors in git log -p, nor does the vim whitespace error detector you emailed me detect a whitespace error, locally.

I used git send-email so there shouldn't be any whitepspace mangling issues, unless patchwork is to blame.

That would actually make a kind of sense, given how often whitespaces issues are the reason for patches being reject; it seems rather high, and I will attach the patch so that you can verify that git has the right thing; I used git send-email so it's unlikely that it is an error on the sending side.

That leaves receive-side error. It seems likely given the line the error is on, that patchwork is pickier than git or the vim bit you sent me. That is the 'offending' line is a shell script that happens to have 8 spaces instead of tab. Methinks this is not a relevant thing to complain about in a shell script; also I wonder whether it would do the same with with e.g. Python? I suspect patchwork is applying Makefile rules to all patches, which is just wrong.

That seems to me to be not particularly useful and creates a situation where users don't have any reliable means of determining if there are whitespace error (according to patchwork) in their patches.

Regards,

Daniel

On 10/01/16 03:37 AM, John Crispin wrote:


On 10/01/2016 08:16, open...@daniel.thecshore.com wrote:
+        else

whitespace error

+               local curtime="$(date +%s)"
+               lo

>From efb8db6baf65dd347bac00d5370f7df41b1f152f Mon Sep 17 00:00:00 2001
From: Daniel Dickinson <open...@daniel.thecshore.com>
Date: Wed, 16 Dec 2015 17:40:07 -0500
Subject: [PATCH] base-files: For sysfixtime use hwclock if RTC available

On systems that have an RTC prefer it to the file-based
time fixup (i.e. use hwclock when there is a permanent
clock instead of the faked up time logic that is needed
when there is not RTC).

Signed-off-by: Daniel Dickinson <open...@daniel.thecshore.com>
---
 package/base-files/files/etc/init.d/sysfixtime | 23 ++++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)

diff --git a/package/base-files/files/etc/init.d/sysfixtime b/package/base-files/files/etc/init.d/sysfixtime
index 4010e06..f40bb6e 100755
--- a/package/base-files/files/etc/init.d/sysfixtime
+++ b/package/base-files/files/etc/init.d/sysfixtime
@@ -2,10 +2,27 @@
 # Copyright (C) 2013-2014 OpenWrt.org
 
 START=00
+STOP=90
 
 boot() {
-	local curtime="$(date +%s)"
-	local maxtime="$(find /etc -type f -exec date -r {} +%s \; | sort -nr | head -n1)"
-	[ $curtime -lt $maxtime ] && date -s @$maxtime
+	if [ -e /dev/rtc ]; then
+		hwclock -s
+        else
+		local curtime="$(date +%s)"
+		local maxtime="$(find /etc -type f -exec date -r {} +%s \; | sort -nr | head -n1)"
+		[ $curtime -lt $maxtime ] && date -s @$maxtime
+	fi
+}
+
+start() {
+	if [ -e /dev/rtc ]; then
+		hwclock -s
+	fi
+}
+
+stop() {
+	if [ -e /dev/rtc ]; then
+		hwclock -w
+	fi
 }
 
-- 
2.4.3

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to