Bug 127844 - Example code skeleton_capture_n.c in meteor(4) manpage does not compile.
Summary: Example code skeleton_capture_n.c in meteor(4) manpage does not compile.
Status: Open
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-04 06:00 UTC by Rowan Crowe
Modified: 2020-08-15 03:50 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rowan Crowe 2008-10-04 06:00:12 UTC
The meteor(4) man page includes 3 code examples for the 3 different modes of capture. The first two are complete and compile without any problems, but the third throws errors about undeclared variables.

I presume there is a line or two that was not correctly copied and pasted from the original source when preparing the man page.

Here's the output of 'gcc skeleton_capture_n.c'

In file included from skeleton_capture_n.c:5:
/usr/include/machine/ioctl_meteor.h:35:2: warning: #warning Include dev/bktr/ioctl_meteor.h instead of this header.
skeleton_capture_n.c: In function 'usr2_catcher':
skeleton_capture_n.c:23: error: 'sig_cnt' undeclared (first use in this function)
skeleton_capture_n.c:23: error: (Each undeclared identifier is reported only once
skeleton_capture_n.c:23: error: for each function it appears in.)
skeleton_capture_n.c:31: error: expected expression before ')' token
skeleton_capture_n.c: In function 'main':
skeleton_capture_n.c:51: error: 'i' undeclared (first use in this function)
skeleton_capture_n.c:52: warning: incompatible implicit declaration of built-in function 'printf'
skeleton_capture_n.c:53: warning: incompatible implicit declaration of built-in function 'exit'
skeleton_capture_n.c:55: warning: incompatible implicit declaration of built-in function 'printf'
skeleton_capture_n.c:59: error: expected expression before ';' token
skeleton_capture_n.c:66: warning: incompatible implicit declaration of built-in function 'exit'
skeleton_capture_n.c:69: error: 'c' undeclared (first use in this function)
skeleton_capture_n.c:73: warning: incompatible implicit declaration of built-in function 'exit'
skeleton_capture_n.c:80: warning: incompatible implicit declaration of built-in function 'exit'
skeleton_capture_n.c:91: error: 'y' undeclared (first use in this function)
skeleton_capture_n.c:96: error: 'struct meteor_capframe' has no member named 'signal'
skeleton_capture_n.c:103: warning: incompatible implicit declaration of built-in function 'exit'
skeleton_capture_n.c:113: warning: incompatible implicit declaration of built-in function 'exit'

Fix: 

Find the missing source lines. :)
How-To-Repeat: Copy and paste the source from the section " 3.   Memory mapped, multi-frame ring buffer synchronize capture." on the meteor(4) man page to a file; attempt to compile it.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2008-10-04 06:23:05 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-doc

Over to maintainer(s).
Comment 2 Tom Rhodes freebsd_committer freebsd_triage 2008-12-25 10:48:37 UTC
State Changed
From-To: open->suspended

Suspend this PR: 

The meteor driver is long gone in the tree and the manual 
page has only been left to document the interface.  What 
would really be great is if someone could do a video4bsd, 
which also seems to have a project for it, and bring that 
in the tree. 

That and I have no clue what sig_cnt is supposed to be. 

~5 years ago, Warner mentioned that someone was working on 
documenting the interface, but if that work still exists 
anywhere, it's probably rotted.  Perhaps some day, someone 
can fix these issues.
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2020-08-15 03:50:21 UTC
^Triage: reset stale In Progress flag.