Bug 23987

Summary: Debug string typo
Product: Base System Reporter: sthg <sthg>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.1-RELEASE   
Hardware: Any   
OS: Any   

Description sthg 2000-12-31 21:00:01 UTC
When having problems with microuptime going backwards, the symptoms look worse due to a typo in the debug message. Instead of a period, the second time is printed with a comma (in /usr/src/sys/kern/kern_synch.c). For example:

Dec 31 23:01:37 xanadu /kernel: microuptime() went backwards (688450.094451 -> 688450,-695028036)
Dec 31 23:01:37 xanadu /kernel: microuptime() went backwards (6884ckwards (688451.905274 -> 688451,885155)
Dec 31 23:01:37 xanadu /kernel: microuptime() went backwards (688451.905274 -> 688451,899963)
Dec 31 23:01:37 xanadu /kernel: microuptime() went backwards (688451.942972 -> 688451,923447)


Also note that there is at least one other bug resulting in a negative usec value, probably subtracting when it should be adding, that I was not able to find.
This comma has been a problem since 4.0 and still exists in 4.2.

Fix: 

Sorry, I don't know how to do a useful diff.

/usr/src/sys/kern/$ diff kern_synch.c*
825c825
<               printf("microuptime() went backwards (%ld.%06ld -> %ld.%06ld)\n",
---
>               printf("microuptime() went backwards (%ld.%06ld -> %ld,%06ld)\n",
Comment 1 bill fumerola freebsd_committer freebsd_triage 2000-12-31 22:11:05 UTC
State Changed
From-To: open->closed

This was already fixed in rev1.91 of kern_synch.c, but never merged: 

Checking in kern_synch.c; 
/home/ncvs/src/sys/kern/kern_synch.c,v  <--  kern_synch.c 
new revision: 1.87.2.3; previous revision: 1.87.2.2 
done 

... so I merged it.