Summary: | libprocstat(3): multiple manpage bugs | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Documentation | Reporter: | Tobias Kortkamp <tobik> | ||||||||
Component: | Manual Pages | Assignee: | freebsd-bugs (Nobody) <bugs> | ||||||||
Status: | Closed FIXED | ||||||||||
Severity: | Affects Some People | CC: | brooks, doc, ngie | ||||||||
Priority: | --- | Keywords: | patch | ||||||||
Version: | Latest | ||||||||||
Hardware: | Any | ||||||||||
OS: | Any | ||||||||||
Attachments: |
|
Created attachment 180920 [details]
libprocstat.3.diff
Small update: Both procstat_{getenvv,getargv} prototypes are wrong. They don't take an errbuf argument.
Created attachment 180921 [details]
libprocstat.3.diff
... and a typo: procstat_freeenv -> procstat_freeenvv
I'll commit the individual patches -- once done, please submit a PR for any other doc bugs you might find with libprocstat(3). Thanks! A commit references this bug: Author: ngie Date: Sat Jul 29 22:16:05 UTC 2017 New revision: 321704 URL: https://svnweb.freebsd.org/changeset/base/321704 Log: Add sys/socket.h to SYNOPSIS for libprocstat(3) sys/socket.h is required for procstat_get_socket_info(3), added in r221807. MFC after: 1 month PR: 217884 Submitted by: tobik Changes: head/lib/libprocstat/libprocstat.3 A commit references this bug: Author: ngie Date: Sat Jul 29 22:19:00 UTC 2017 New revision: 321705 URL: https://svnweb.freebsd.org/changeset/base/321705 Log: libprocstat(3): fix reference (typo) to procstat_freeenvv in description for procstat_getargv(3) PR: 217884 MFC after: 1 month Submitted by: tobik Changes: head/lib/libprocstat/libprocstat.3 A commit references this bug: Author: ngie Date: Sat Jul 29 22:25:45 UTC 2017 New revision: 321706 URL: https://svnweb.freebsd.org/changeset/base/321706 Log: libprocstat(3): fix arguments list for procstat_getargv(3) and procstat_getenvv(3) Neither libcall takes a fourth argument (`char *errbuf`). PR: 217884 Submitted by: tobik MFC after: 1 month Changes: head/lib/libprocstat/libprocstat.3 A commit references this bug: Author: ngie Date: Fri Sep 8 04:45:19 UTC 2017 New revision: 323301 URL: https://svnweb.freebsd.org/changeset/base/323301 Log: MFC r321704,r321705,r321706: r321704: Add sys/socket.h to SYNOPSIS for libprocstat(3) sys/socket.h is required for procstat_get_socket_info(3), added in r221807. PR: 217884 r321705: libprocstat(3): fix reference (typo) to procstat_freeenvv in description for procstat_getargv(3) PR: 217884 r321706: libprocstat(3): fix arguments list for procstat_getargv(3) and procstat_getenvv(3) Neither libcall takes a fourth argument (`char *errbuf`). PR: 217884 Changes: _U stable/11/ stable/11/lib/libprocstat/libprocstat.3 A commit references this bug: Author: ngie Date: Fri Sep 8 04:45:19 UTC 2017 New revision: 323301 URL: https://svnweb.freebsd.org/changeset/base/323301 Log: MFC r321704,r321705,r321706: r321704: Add sys/socket.h to SYNOPSIS for libprocstat(3) sys/socket.h is required for procstat_get_socket_info(3), added in r221807. PR: 217884 r321705: libprocstat(3): fix reference (typo) to procstat_freeenvv in description for procstat_getargv(3) PR: 217884 r321706: libprocstat(3): fix arguments list for procstat_getargv(3) and procstat_getenvv(3) Neither libcall takes a fourth argument (`char *errbuf`). PR: 217884 Changes: _U stable/11/ stable/11/lib/libprocstat/libprocstat.3 A commit references this bug: Author: ngie Date: Fri Sep 8 04:45:19 UTC 2017 New revision: 323301 URL: https://svnweb.freebsd.org/changeset/base/323301 Log: MFC r321704,r321705,r321706: r321704: Add sys/socket.h to SYNOPSIS for libprocstat(3) sys/socket.h is required for procstat_get_socket_info(3), added in r221807. PR: 217884 r321705: libprocstat(3): fix reference (typo) to procstat_freeenvv in description for procstat_getargv(3) PR: 217884 r321706: libprocstat(3): fix arguments list for procstat_getargv(3) and procstat_getenvv(3) Neither libcall takes a fourth argument (`char *errbuf`). PR: 217884 Changes: _U stable/11/ stable/11/lib/libprocstat/libprocstat.3 I think bdrewery backported this. Thanks. This seems to be fixed. |
Created attachment 180918 [details] libprocstat.3.diff libprocstat(3) says to include these three headers, but this simple program fails to compile: #include <sys/param.h> #include <sys/queue.h> #include <libprocstat.h> int main(int argc, char *argv[]) {} /usr/include/libprocstat.h:154:26: error: field has incomplete type 'struct sockaddr_storage' struct sockaddr_storage sa_local; /* Socket address. */ ^ /usr/include/libprocstat.h:154:9: note: forward declaration of 'struct sockaddr_storage' struct sockaddr_storage sa_local; /* Socket address. */ ^ /usr/include/libprocstat.h:155:26: error: field has incomplete type 'struct sockaddr_storage' struct sockaddr_storage sa_peer; /* Peer address. */ ^ /usr/include/libprocstat.h:154:9: note: forward declaration of 'struct sockaddr_storage' struct sockaddr_storage sa_local; /* Socket address. */ ^ 2 errors generated. Clearly more headers are needed and the documentation is incomplete. Since adding sys/_sockaddr_storage.h is probably wrong, we could add sys/user.h, netinet/in.h, or sys/socket.h. procstat(1)'s sources all include sys/user.h, so I suspect that it is the header that is missing. sys/user.h already includes sys/queue.h, so it is maybe not needed?