NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/52059: bootime in kernel is of type struct timespec, not struct timeval.



>Number:         52059
>Category:       kern
>Synopsis:       bootime in kernel is of type struct timespec, not struct timeval.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 10 04:35:00 +0000 2017
>Originator:     Tomoyuki Sahara
>Release:        6.1.5
>Organization:
Internet Initiative Japan Inc.
>Environment:
NetBSD a.example.com 6.1.5_PATCH NetBSD 6.1.5_PATCH (GENERIC) #0: Wed May 20 11:03:23 JST 2015  tsahara%a.example.com@localhost:/usr/obj/sys/arch/amd64/compile/GENERIC amd64

>Description:
time_second(9) says boottime is of type struct timeval but it is actually defined as a variable of struct timespec in sys/init_main.c.  The manual page should be corrected.

http://netbsd.gw.com/cgi-bin/man-cgi?time_second++NetBSD-current
https://nxr.netbsd.org/xref/src/sys/kern/init_main.c#237

>How-To-Repeat:

>Fix:
--- a/share/man/man9/time_second.9
+++ b/share/man/man9/time_second.9
@@ -45,7 +45,7 @@
 .Vt extern time_t time_second;
 .Vt extern time_t time_uptime;
 .In sys/kernel.h
-.Vt extern struct timeval boottime;
+.Vt extern struct timespec boottime;
 .Sh DESCRIPTION
 The
 .Va time_second
@@ -76,7 +76,7 @@ with
 The variable may be read and written without special precautions.
 .Pp
 All of these variables contain times
-expressed in seconds and microseconds since midnight (0 hour),
+expressed in seconds and nanoseconds since midnight (0 hour),
 January 1, 1970.
 .Pp
 The



Home | Main Index | Thread Index | Old Index