Bug 34460

Summary: potential minor error in Developer's Handbook + mem(4) man page
Product: Documentation Reporter: Bruce Dang <bruce>
Component: Books & ArticlesAssignee: freebsd-doc (Nobody) <doc>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Bruce Dang 2002-01-30 18:10:04 UTC
On page 40 of the Developer's Handbook (PDF version), there's something like "will always null terminate the string." Shouldn't this be NUL terinated, instead of NULL (ptr).

In addition to that, the mem(4) man page makes references to <memrange.h> for various #defines, but it is actually <sys/memrange.h> that defines them...

Fix: 

- change "null" to NUL on p. 40 of the developer's handbook
- change <memrange.h> to <sys/memrange.h> in mem(4) manpage
How-To-Repeat: - look page 40 of the dev's handbook
- man 4 mem
Comment 1 Peter Pentchev 2002-01-30 18:22:59 UTC
On Wed, Jan 30, 2002 at 10:05:25AM -0800, Bruce Dang wrote:
> 
> >Number:         34460
> >Category:       docs
> >Synopsis:       potential minor error in Developer's Handbook + mem(4) man page
> >Originator:     Bruce Dang
> >Description:
> On page 40 of the Developer's Handbook (PDF version), there's
> something like "will always null terminate the string." Shouldn't
> this be NUL terinated, instead of NULL (ptr).

I think this came up recently in another context, and the resolution
was that both "NUL-terminated" and "null-terminated" were correct, and
"NULL-terminated" is definitely wrong.  NUL is right in the sense of
the ASCII character NUL, and 'null' is right in its semantical sense
of 'zero', 'emptiness' or something like that.  So, although the tide
may have turned since then, I doubt it, and I think that "null
terminated" would be right.

> In addition to that, the mem(4) man page makes references to
> <memrange.h> for various #defines, but it is actually
> <sys/memrange.h> that defines them...

This looks genuine.  Patch attached for the benefit of -doc
committers.

G'luck,
Peter

-- 
If there were no counterfactuals, this sentence would not have been paradoxical.

Index: src/share/man/man4/mem.4
===================================================================
RCS file: /home/ncvs/src/share/man/man4/mem.4,v
retrieving revision 1.13
diff -u -r1.13 mem.4
--- src/share/man/man4/mem.4	21 Jan 2002 12:09:13 -0000	1.13
+++ src/share/man/man4/mem.4	30 Jan 2002 18:21:20 -0000
@@ -77,7 +77,7 @@
 calls performed on
 .Nm /dev/mem .
 Declarations and data types are to be found in
-.Pa <memrange.h>
+.Pa <sys/memrange.h>
 .Pp
 The specific attributes, and number of programmable ranges may vary between
 architectures.  The full set of supported attributes is:
Comment 2 dd freebsd_committer freebsd_triage 2002-02-10 08:52:29 UTC
State Changed
From-To: open->closed

As Peter pointed out, the developers handbook part is a non-issue, and 
I've applied his mem(4) patch.