diff -Nru aurora-1.6.9/a.dat aurora-1.7.0a/a.dat --- aurora-1.6.9/a.dat 2011-08-13 21:58:29.000000000 +0000 +++ aurora-1.7.0a/a.dat 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -20110813-16:58:09 194.537506 0.215119 41.848713 182.500793 0.189488 34.581673 243.300507 0.161098 44.069748 59.989441 57.659985 53.064495 49.098000 6.759 22.882 0.000 6.759 6.759 6234.906 102.633 OK -20110813-16:58:27 196.290802 0.213288 41.866512 180.767197 0.189030 34.170441 242.857300 0.161098 43.097633 59.990883 56.679852 53.064495 49.098000 6.759 22.882 0.000 6.759 6.759 6234.906 102.634 OK diff -Nru aurora-1.6.9/comm.c aurora-1.7.0a/comm.c --- aurora-1.6.9/comm.c 2011-08-14 02:27:27.000000000 +0000 +++ aurora-1.7.0a/comm.c 2011-08-24 14:39:49.000000000 +0000 @@ -50,10 +50,11 @@ * 2. fixed bizarreness with -bt * 3. adjust TimeBase to true UTC-0000 and take into account timezone in GetTime (-t) * SetTime (-S) functions + * modified 22-aug-2011 cjb 1. in SetTime check scanf return value rc * */ -char VersionC[7] = "1.6.9"; +char VersionC[7] = "1.7.0a"; #include #include @@ -869,7 +870,7 @@ printf(" (Not enabled on all models.)\n"); printf("\nAre you sure your want to proceed? y/[n] : "); rc = scanf("%c", &answer); - if(answer != 'y' && answer != 'Y') return(1); + if(rc != EOF || (answer != 'y' && answer != 'Y')) return(1); timeValLong = time(NULL); tim = *(localtime(&timeValLong)); diff -Nru aurora-1.6.9/debian/changelog aurora-1.7.0a/debian/changelog --- aurora-1.6.9/debian/changelog 2011-08-19 23:23:08.000000000 +0000 +++ aurora-1.7.0a/debian/changelog 2011-08-24 15:56:34.000000000 +0000 @@ -1,8 +1,9 @@ -aurora (1.6.9-0ubuntu1~ppa2) oneiric; urgency=low +aurora (1.7.0a-0ubuntu1~ppa1) oneiric; urgency=low * New upstream release + * drop build patch - -- Dustin Kirkland Fri, 19 Aug 2011 16:22:47 -0700 + -- Dustin Kirkland Wed, 24 Aug 2011 10:56:26 -0500 aurora (1.6.8-0ubuntu1) oneiric; urgency=low diff -Nru aurora-1.6.9/debian/patches/debian-changes-1.6.9-0ubuntu1~ppa2 aurora-1.7.0a/debian/patches/debian-changes-1.6.9-0ubuntu1~ppa2 --- aurora-1.6.9/debian/patches/debian-changes-1.6.9-0ubuntu1~ppa2 2011-08-19 23:23:40.000000000 +0000 +++ aurora-1.7.0a/debian/patches/debian-changes-1.6.9-0ubuntu1~ppa2 1970-01-01 00:00:00.000000000 +0000 @@ -1,55 +0,0 @@ -Description: Upstream changes introduced in version 1.6.9-0ubuntu1~ppa2 - This patch has been created by dpkg-source during the package build. - Here's the last changelog entry, hopefully it gives details on why - those changes were made: - . - aurora (1.6.9-0ubuntu1~ppa2) oneiric; urgency=low - . - * New upstream release - . - The person named in the Author field signed this changelog entry. -Author: Dustin Kirkland - ---- -The information above should follow the Patch Tagging Guidelines, please -checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here -are templates for supplementary fields that you might want to add: - -Origin: , -Bug: -Bug-Debian: http://bugs.debian.org/ -Bug-Ubuntu: https://launchpad.net/bugs/ -Forwarded: -Reviewed-By: -Last-Update: - ---- aurora-1.6.9.orig/Makefile -+++ aurora-1.6.9/Makefile -@@ -29,10 +29,12 @@ endif - - ifdef GFLAGS - ifndef ARCH --GARCH = $(shell echo ${GFLAGS} | awk '{for (i =1; i <= NF; i++) print $$i}' | grep -e "^-march=" | sed -e 's/-march=//') -+GARCH1 = $(shell echo ${GFLAGS} | awk '{for (i =1; i <= NF; i++) print $$i}' | grep -e "^-march=" | sed -e 's/-march=//') -+GARCH = $(shell echo ${GARCH1} | sed -e 's/ native//' -e 's/native //') - endif - ifndef TUNE --GTUNE = $(shell echo ${GFLAGS} | awk '{for (i =1; i <= NF; i++) print $$i}' | grep -e "^-mtune=" | sed -e 's/-mtune=//') -+GTUNE1 = $(shell echo ${GFLAGS} | awk '{for (i =1; i <= NF; i++) print $$i}' | grep -e "^-mtune=" | sed -e 's/-mtune=//') -+GTUNE = $(shell echo ${GTUNE1} | sed -e 's/ native//' -e 's/native //') - endif - endif - -@@ -70,10 +72,10 @@ endif - endif - - ifneq "$(strip $(ARCH))" "" --ARCH2 = -march=${ARCH} -+ARCH2 = $(shell echo ${ARCH} | awk '{for (i =1; i <= NF; i++) print "-march="$$i}') - endif - ifneq "$(strip $(TUNE))" "" --TUNE2 = -mtune=${TUNE} -+TUNE2 = $(shell echo ${TUNE} | awk '{for (i =1; i <= NF; i++) print "-mtune="$$i}') - endif - - TARGET = aurora diff -Nru aurora-1.6.9/debian/patches/fix_build.patch aurora-1.7.0a/debian/patches/fix_build.patch --- aurora-1.6.9/debian/patches/fix_build.patch 1970-01-01 00:00:00.000000000 +0000 +++ aurora-1.7.0a/debian/patches/fix_build.patch 2011-07-30 17:45:17.000000000 +0000 @@ -0,0 +1,13 @@ +--- a/Makefile 2011-01-20 14:42:55.000000000 -0600 ++++ b/Makefile 2011-07-30 12:44:47.608938592 -0500 +@@ -1,8 +1,8 @@ + CC = gcc +-CFLAGS = -O2 -Wall -I/usr/include -I./include -march=amdfam10 -mtune=amdfam10 ++CFLAGS = -O2 -Wall -I/usr/include -I./include + + # uncomment the following line if compiling on a 64 bit machine +-BIT64 = -Dbit64 ++#BIT64 = -Dbit64 + + INSTALLSITEMAN1DIR = ${mandir}/man1 + DISTMAN1DIR = docs/man diff -Nru aurora-1.6.9/debian/patches/series aurora-1.7.0a/debian/patches/series --- aurora-1.6.9/debian/patches/series 2011-08-19 23:23:23.000000000 +0000 +++ aurora-1.7.0a/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ - -debian-changes-1.6.9-0ubuntu1~ppa2 diff -Nru aurora-1.6.9/main.c aurora-1.7.0a/main.c --- aurora-1.6.9/main.c 2011-08-14 03:07:12.000000000 +0000 +++ aurora-1.7.0a/main.c 2011-08-24 14:39:40.000000000 +0000 @@ -47,12 +47,13 @@ * modified 21-sep-2010 cjb 1. added -A option to read "Last four alarms" * modified 22-jan-2011 cjb 1. added -k option to get up to a years worth of daily generation history * modified 19-mar-2011 cjb 1. added -X option to enable RTS/CTS on the serial port - * modified 13-aug-2001 cjb 1. increase the allowed values from 31 to 63 for inverter address (-a) + * modified 13-aug-2011 cjb 1. increase the allowed values from 31 to 63 for inverter address (-a) * as allowed in newer inverters + * modified 22-aug-2011 cjb 1. clean up compile 'unused-but-set' messages * */ -static char VersionM[] = "1.6.9"; +static char VersionM[] = "1.7.0a"; char VersionC[7]; #include @@ -153,6 +154,7 @@ struct tm timStruct; long rPID; int bRead, bWrite, lckCNT; + int errno_save = 0; char cmdFile[255]; char command[255]; char *SubStrPos = NULL; @@ -242,7 +244,13 @@ exit(2); } bWrite = fprintf(fdserlck, "%ld\n", PID); + errno_save = errno; fclose(fdserlck); + if (bWrite < 0 || errno_save != 0) { + if(bVerbose) fprintf(stderr, "\n"); + fprintf(stderr, "%s: %s: Problem locking serial device, can't write lock file: %s.\n%s\n\n",RunTime,ProgramName,devLCKfile,strerror (errno_save)); + exit(2); + } rPID = 0; lckCNT = -1; @@ -254,7 +262,14 @@ exit(2); } bRead = fscanf(fdserlck, "%ld", &rPID); + errno_save = errno; fclose(fdserlck); + if(bRead == EOF || errno_save != 0) { + if(bVerbose) fprintf(stderr, "\n"); + fprintf(stderr, "%s: %s: Problem locking serial device, can't read lock file: %s.\n%s\n\n",RunTime,ProgramName,devLCKfile,strerror (errno_save)); + exit(2); + } + sprintf(cmdFile,"/proc/%ld/cmdline",rPID); fdserlck = fopen(cmdFile, "r"); if (fdserlck != NULL) { @@ -545,6 +560,7 @@ FILE *fdserlck, *fdserlcknew; long rPID; int bWrite, bRead; + int errno_save = 0; if(bVerbose) fprintf(stderr, "\ndevLCKfile <%s>\ndevLCKfileNew <%s>\nClearing Serial Port Lock (%ld)...", devLCKfile, devLCKfileNew, PID); fdserlck = fopen(devLCKfile, "r"); @@ -562,7 +578,13 @@ } bRead = fscanf(fdserlck, "%ld", &rPID); while (bRead != EOF) { - if (rPID != PID) bWrite = fprintf(fdserlcknew, "%ld\n", rPID); + if (rPID != PID) { + bWrite = fprintf(fdserlcknew, "%ld\n", rPID); + errno_save = errno; + if (bWrite < 0 || errno_save != 0) { + fprintf(stderr, "%s: %s: Problem clearing serial device lock, can't write lock file: %s.\n%s\n\n",RunTime,ProgramName,devLCKfile,strerror (errno_save)); + } + } bRead = fscanf(fdserlck, "%ld", &rPID); } fclose(fdserlck); diff -Nru aurora-1.6.9/Makefile aurora-1.7.0a/Makefile --- aurora-1.6.9/Makefile 2011-08-13 19:40:30.000000000 +0000 +++ aurora-1.7.0a/Makefile 2011-08-17 20:45:05.000000000 +0000 @@ -29,10 +29,12 @@ ifdef GFLAGS ifndef ARCH -GARCH = $(shell echo ${GFLAGS} | awk '{for (i =1; i <= NF; i++) print $$i}' | grep -e "^-march=" | sed -e 's/-march=//') +GARCH1 = $(shell echo ${GFLAGS} | awk '{for (i =1; i <= NF; i++) print $$i}' | grep -e "^-march=" | sed -e 's/-march=//') +GARCH = $(shell echo ${GARCH1} | sed -e 's/ native//' -e 's/native //') endif ifndef TUNE -GTUNE = $(shell echo ${GFLAGS} | awk '{for (i =1; i <= NF; i++) print $$i}' | grep -e "^-mtune=" | sed -e 's/-mtune=//') +GTUNE1 = $(shell echo ${GFLAGS} | awk '{for (i =1; i <= NF; i++) print $$i}' | grep -e "^-mtune=" | sed -e 's/-mtune=//') +GTUNE = $(shell echo ${GTUNE1} | sed -e 's/ native//' -e 's/native //') endif endif @@ -70,10 +72,10 @@ endif ifneq "$(strip $(ARCH))" "" -ARCH2 = -march=${ARCH} +ARCH2 = $(shell echo ${ARCH} | awk '{for (i =1; i <= NF; i++) print "-march="$$i}') endif ifneq "$(strip $(TUNE))" "" -TUNE2 = -mtune=${TUNE} +TUNE2 = $(shell echo ${TUNE} | awk '{for (i =1; i <= NF; i++) print "-mtune="$$i}') endif TARGET = aurora