From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <199607252354.SAA20330@twiddle.tamu.edu> Date: Thu, 25 Jul 1996 18:54:30 -0500 (CDT) From: Richard Henderson Subject: timeout printing bug in ipfwadm Enclosed is a patch to ipfwadm.c to deal with system clocks not running at 100Hz. r~ --- ipfwadm.c.orig Mon Jun 17 05:33:11 1996 +++ ipfwadm.c Thu Jul 25 18:35:24 1996 @@ -100,6 +100,10 @@ #include #include +#ifndef HZ +#define HZ __KERNEL_HZ +#endif + #ifndef IP_FW_F_REDIR #define IPFWADM_NO_REDIR #define IP_FW_F_REDIR 0 @@ -1548,9 +1552,9 @@ break; } - sec100s = ms->expires % 100L; - seconds = (ms->expires / 100L) % 60; - minutes = ms->expires / 6000L; + sec100s = ms->expires % HZ * 100 / HZ; + seconds = ms->expires / HZ % 60; + minutes = ms->expires / (HZ * 60); fprintf(fp, "%02ld:%02ld.%02ld ", minutes, seconds, sec100s); -- To unsubscribe: mail -s unsubscribe axp-list-request@redhat.com < /dev/null