Bug 203498

Summary: Example in g_geom(9) man page returns wrong type
Product: Documentation Reporter: chadf
Component: Books & ArticlesAssignee: Christian Brueffer <brueffer>
Status: Closed FIXED    
Severity: Affects Some People CC: ae, brueffer
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patch to correct error none

Description chadf 2015-10-02 03:08:23 UTC
Created attachment 161638 [details]
Patch to correct error

The g_example_start() example function in g_geom(9) is shown to return 'struct geom *' when it should be 'void'.

           static struct geom *
           g_example_start(struct bio *bp)
           {

-->>

           static void
           g_example_start(struct bio *bp)
           {

Patch included.
Comment 1 Andrey V. Elsukov freebsd_committer freebsd_triage 2015-10-05 18:37:13 UTC
g_example_access() also has incorrect prototype.
Comment 2 commit-hook freebsd_committer freebsd_triage 2016-04-24 08:31:36 UTC
A commit references this bug:

Author: brueffer
Date: Sun Apr 24 08:31:33 UTC 2016
New revision: 298532
URL: https://svnweb.freebsd.org/changeset/base/298532

Log:
  Correct types for g_example_start() and g_example_access().

  PR:		203498
  Submitted by:	chadf@triularity.org, ae
  MFC after:	1 week
  Sponsored by:	Essen Hackathon 2016

Changes:
  head/share/man/man9/g_geom.9
Comment 3 Christian Brueffer freebsd_committer freebsd_triage 2016-04-24 08:34:31 UTC
Fixed in HEAD, I'll merge this to the stable branches soon.  Thanks!