Bug 203498 - Example in g_geom(9) man page returns wrong type
Summary: Example in g_geom(9) man page returns wrong type
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Books & Articles (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Christian Brueffer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-02 03:08 UTC by chadf
Modified: 2017-05-22 16:15 UTC (History)
2 users (show)

See Also:


Attachments
Patch to correct error (361 bytes, patch)
2015-10-02 03:08 UTC, chadf
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!