Source-Changes-HG archive

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

[src/uebayasi-xip]: src/share/man/man9 Add HISTORY.



details:   https://anonhg.NetBSD.org/src/rev/47ce8080f4dd
branches:  uebayasi-xip
changeset: 751660:47ce8080f4dd
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Tue Apr 13 11:01:23 2010 +0000

description:
Add HISTORY.

diffstat:

 share/man/man9/ctod.9 |  82 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 82 insertions(+), 0 deletions(-)

diffs (86 lines):

diff -r 12ab71c9311f -r 47ce8080f4dd share/man/man9/ctod.9
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/share/man/man9/ctod.9     Tue Apr 13 11:01:23 2010 +0000
@@ -0,0 +1,82 @@
+.\" $NetBSD: ctod.9,v 1.3.2.2 2010/04/13 11:01:23 jruoho Exp $
+.\"
+.\" Copyright (c) 2010 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Jukka Ruohonen.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd April 13, 2010
+.Dt CTOD 9
+.Os
+.Sh NAME
+.Nm ctod
+.Nd macros related to bytes, pages, and disk blocks
+.Sh SYNOPSIS
+.In sys/param.h
+.Ft size
+.Fn ctod "size x"
+.Ft size
+.Fn dtoc "size x"
+.Ft size
+.Fn ctob "size x"
+.Ft size
+.Fn btoc "size x"
+.Ft size
+.Fn dbtob "size x"
+.Ft size
+.Fn btodb "size x"
+.Sh DESCRIPTION
+The
+.Nm
+family of macros can be used to convert between bytes, pages
+.Pq Dq clicks ,
+and disk blocks.
+.Pp
+The following table lists the possible conversions:
+.Bl -column -offset indent "disk blocks " "disk blocks " "disk blocks "
+.It Sy Macro Ta Sy From Ta Sy To
+.It Fn ctod Ta pages Ta disk blocks
+.It Fn dtoc Ta disk blocks Ta pages
+.It Fn ctob Ta pages Ta bytes
+.It Fn btoc Ta bytes Ta pages
+.It Fn dbtob Ta disk blocks Ta bytes
+.It Fn btodb Ta bytes Ta disk blocks
+.El
+.Pp
+These are typical macros that may appear
+with different names in other operating systems.
+Examples include
+.Fn btop
+and
+.Fn btopr
+in Solaris.
+.Sh HISTORY
+Some of these macros appeared in
+.At v7 .
+.Sh CAVEATS
+The described macros make no assumptions
+about the type of the input parameter.
+A caller should ensure that neither
+integer overflow nor integer underflow are possible.



Home | Main Index | Thread Index | Old Index