Summary: | ASTERISK-12689: [patch] 'core show sysinfo' on systems without HAVE_SYSINFO but with HAVE_SYSCTL | ||
Reporter: | Michiel van Baak (mvanbaak) | Labels: | |
Date Opened: | 2008-09-06 06:21:49 | Date Closed: | 2008-12-16 14:08:31.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Core/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 2008090600_coreshowsysinfo_sysctl.diff.txt ( 1) 2008090700-coreshowsysinfo_sysctl.diff.txt ( 2) 2008121300_sysinfosysctl.diff.txt | |
Description: | OpenBSD for example has no HAVE_SYSINFO so 'core show sysinfo' is not working there. This patch add HAVE_SYSCTL and grabs the sysinfo with sysctl. Tested on OpenBSD. ****** ADDITIONAL INFORMATION ****** I'm posting it here so others can review it. If this is accepted, I will also alter func_sysinfo to have sysctl support. | ||
Comments: | By: Tilghman Lesher (tilghman) 2008-09-06 10:25:05 This patch includes what is indicated to be a new system call, but you aren't detecting it. Also, the patch includes a comment that indicates that some of the code is written by a 3rd party, who presumably we do not have a license on file for. By: Michiel van Baak (mvanbaak) 2008-09-06 18:43:23 What call ? As far as I can see I detect wether we have sysctl support or not. The function for the swap usage is written under the 2-clause BSD license, so we can use it without trouble. All they want is their name in the code and that is what I did. By: Tilghman Lesher (tilghman) 2008-09-07 11:53:31 Check out the patch. Linux has sysctl(2), too, but the patch uses a swapctl(2) call, which does not exist on Linux. By: Michiel van Baak (mvanbaak) 2008-09-07 14:55:07 New patch that also checks for swapctl uploaded. Thanks for the feedback. How is this one ? By: Leif Madsen (lmadsen) 2008-12-09 07:59:59.000-0600 Is this a good candidate for reviewboard? Or are we not that far yet? By: Michiel van Baak (mvanbaak) 2008-12-13 07:35:08.000-0600 Uploaded new patch against current svn trunk. Review request posted here: http://reviewboard.digium.com/r/91/ By: Digium Subversion (svnbot) 2008-12-16 14:08:30.000-0600 Repository: asterisk Revision: 164802 U trunk/configure U trunk/configure.ac U trunk/include/asterisk/autoconfig.h.in U trunk/main/asterisk.c ------------------------------------------------------------------------ r164802 | mvanbaak | 2008-12-16 14:08:30 -0600 (Tue, 16 Dec 2008) | 10 lines introduce 'core show sysinfo' for systems that dont have the Linux-ish sysinfo stuff but do have sysctl. (closes issue ASTERISK-12689) Reported by: mvanbaak Patches: 2008121300_sysinfosysctl.diff.txt uploaded by mvanbaak (license 7) with two free calls replaced with ast_free based on feedback on reviewboard Review: http://reviewboard.digium.com/r/91/ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=164802 |