[Nut-upsdev] The latest newhidups changes

Alfred Ganz alfred-ganz+nut at agci.com
Sun Oct 9 17:16:51 UTC 2005


Peter,

Thanks a lot for your latest changes to newhidups, which I like a lot.
Unfortunately, when I tried to build the latest development tree stuff,
I got a compile time error when compiling al175.c. It looks to me like
my compiler, gcc-3.4.4-2.fc3, doesn't like the macro definition for
"RECV(reg) do"  because of a poorly inserted comment. I fixed the
problem locally by the following patch. However, I think this problem
is not unique to my compiler, which is actually rather new, and so I
hope someone will change this in the real source.

I will now try to test the latest changes, unfortunately this involves
the usual, rather unliked, shutting of the system and putting the UPS
on a switched outlet etc, etc.

Thanks again for the update, AG

-----------------------------------------------------------------------------
diff -ru nut-2.1.dev.orig/drivers/al175.c nut-2.1.dev/drivers/al175.c
--- nut-2.1.dev.orig/drivers/al175.c	2005-10-08 17:39:02.000000000 -0400
+++ nut-2.1.dev/drivers/al175.c	2005-10-09 12:55:50.000000000 -0400
@@ -1087,11 +1087,11 @@
 	err = al175_read(x ## reg, 0x ## reg, sizeof(x ## reg));	\
 	if (err==-1) {							\
 		dstate_datastale();					\
-/*		goto out;						\ */
 		alarm(0);						\
 		return;							\
 	}								\
 } while (0)
+/*		goto out;						\ */
 
 	RECV(4000);
 	RECV(4048);
-----------------------------------------------------------------------------

-- 
 ----------------------------------------------------------------------
   Alfred Ganz					alfred-ganz at agci.com
   AG Consulting, Inc.				(203) 624-9667
   440 Prospect Street # 11
   New Haven, CT 06511
 ----------------------------------------------------------------------



More information about the Nut-upsdev mailing list