#104 HZ used in adjtimex02 should be from sysconf

Miscellaneous
closed
mreed
Testcases (113)
5
2007-02-28
2006-11-20
wei
No

In test case adjtimex02, the HZ value used was from hard
coded value in /usr/include/asm/param.h. It should use
sysconf(_SC_CLK_TCK), as it is kernel configurable at
compile time. So in adjtimex02.c, following codes could
be added in main() to get correct value of HZ,

int HZ;

if ((HZ = sysconf(_SC_CLK_TCK)) == -1) {
perror("sysconf failed");
return 1;
}

Discussion

    • assigned_to: nobody --> mreed10
     
  • mreed
    mreed
    2007-02-28

    Logged In: YES
    user_id=1098499
    Originator: NO

    This fix was included in the Nov. release

     
  • mreed
    mreed
    2007-02-28

    • status: open --> closed