NetBSD Problem Report #52059

From www@NetBSD.org  Fri Mar 10 04:32:47 2017
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 1CC687A264
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 10 Mar 2017 04:32:47 +0000 (UTC)
Message-Id: <20170310043245.B5D8A7A28E@mollari.NetBSD.org>
Date: Fri, 10 Mar 2017 04:32:45 +0000 (UTC)
From: tsahara@iij.ad.jp
Reply-To: tsahara@iij.ad.jp
To: gnats-bugs@NetBSD.org
Subject: bootime in kernel is of type struct timespec, not struct timeval.
X-Send-Pr-Version: www-1.0

>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:          closed
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 10 04:35:00 +0000 2017
>Closed-Date:    Tue Mar 14 07:26:49 +0000 2017
>Last-Modified:  Tue Mar 14 07:26:49 +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:/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

>Release-Note:

>Audit-Trail:
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52059 CVS commit: src/share/man/man9
Date: Tue, 14 Mar 2017 07:23:50 +0000

 Module Name:	src
 Committed By:	dholland
 Date:		Tue Mar 14 07:23:50 UTC 2017

 Modified Files:
 	src/share/man/man9: time_second.9

 Log Message:
 boottime is a timespec these days.
 From Tomoyuki Sahara in PR 52059.


 To generate a diff of this commit:
 cvs rdiff -u -r1.5 -r1.6 src/share/man/man9/time_second.9

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Tue, 14 Mar 2017 07:26:49 +0000
State-Changed-Why:
Fixed in HEAD, thanks.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.