<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test2/usr.bin/vmstat/vmstat.c, branch release/5.3.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F5.3.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F5.3.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/'/>
<updated>2004-06-30T01:34:26Z</updated>
<entry>
<title>Make vmstat -m work with -M/-N again.  Note that making vmstat -z work</title>
<updated>2004-06-30T01:34:26Z</updated>
<author>
<name>Brian Feldman</name>
<email>green@FreeBSD.org</email>
</author>
<published>2004-06-30T01:34:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=22ab6be3d48b2d0aa04d43292de5c3643aa70715'/>
<id>urn:sha1:22ab6be3d48b2d0aa04d43292de5c3643aa70715</id>
<content type='text'>
is much harder, and -m is grossly using unexported interfaces (that is,
the array of malloc zones/sizes does not have an exported type).
</content>
</entry>
<entry>
<title>Print fork statistics with %u as they are unsigned quantities.</title>
<updated>2004-04-23T13:10:29Z</updated>
<author>
<name>Tim J. Robbins</name>
<email>tjr@FreeBSD.org</email>
</author>
<published>2004-04-23T13:10:29Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=6d4ba9cd4ebf538dbffeb29bbf1b66d8e6139191'/>
<id>urn:sha1:6d4ba9cd4ebf538dbffeb29bbf1b66d8e6139191</id>
<content type='text'>
PR:		65889
Submitted by:	Ken Stailey
</content>
</entry>
<entry>
<title>Properly document the -M and -N options.</title>
<updated>2004-03-26T11:01:45Z</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@FreeBSD.org</email>
</author>
<published>2004-03-26T11:01:45Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=ab82970ed2bc15c3b83fb33e8fd84faf072c8c42'/>
<id>urn:sha1:ab82970ed2bc15c3b83fb33e8fd84faf072c8c42</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fixed a misspelling of 0 as NULL.</title>
<updated>2004-03-11T11:30:57Z</updated>
<author>
<name>Bruce Evans</name>
<email>bde@FreeBSD.org</email>
</author>
<published>2004-03-11T11:30:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=c04458955453548dd99e755efb6acc03d9f5f835'/>
<id>urn:sha1:c04458955453548dd99e755efb6acc03d9f5f835</id>
<content type='text'>
Fixed a nearby bug.  The "play it safe" code in dosysctl() was unsafe
because it overran the buffer by 1 if sysctl() filled all of the buffer.

Fixed a nearby style bug in output.  Not just 1, but 2 extra newlines
were printed at the end by "vmstat -m" and "vmstat -z".  Don't print
any newlines explicitly.  This depends on 2 of the many formatting
bugs in the corresponding sysctls.  First, the sysctls return an extra
newline at the end of the strings.  This also messes up output from
sysctl(8).  Second, the sysctls return an extra newline at the beginning
of the strings.  This is good for separating the 2 tables output by
"vmstat -mz" and for starting the header on a new line in plain sysctl
output, but gives a bogus extra newline at the beginning for "vm -[m | z]"
and "sysctl -n [kern.malloc | vm.zone]".

Fixed some nearby style bugs in the source code:
- the same line that misspelled 0 as NULL also spelled NULL as 0.
- the size was doubled twice in the realloc loop.
- the "play it safe" comment was misleading.  Terminating the buffer
  is bogus because dosysctl() is only meant to work with sysctls that
  return strings and the terminator is part of a string.  However, the
  kern.malloc sysctl has more than style bugs.  It also doesn't return
  a string.  Termination is needed to work around this bug.
</content>
</entry>
<entry>
<title>Remove an unused variable.</title>
<updated>2003-12-25T01:32:55Z</updated>
<author>
<name>David Malone</name>
<email>dwmalone@FreeBSD.org</email>
</author>
<published>2003-12-25T01:32:55Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=67206e04f9259feed999453984fe0d38e8c1e0b5'/>
<id>urn:sha1:67206e04f9259feed999453984fe0d38e8c1e0b5</id>
<content type='text'>
Add some missing constness.
</content>
</entry>
<entry>
<title>Fixed misplacement of __FBSDID().  Backed out editing of vendor id lines.</title>
<updated>2003-12-11T10:58:29Z</updated>
<author>
<name>Bruce Evans</name>
<email>bde@FreeBSD.org</email>
</author>
<published>2003-12-11T10:58:29Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=06849fd97ac871901317270e4afc0b48b908bd40'/>
<id>urn:sha1:06849fd97ac871901317270e4afc0b48b908bd40</id>
<content type='text'>
Just wrap them in #if 0...#endif.
</content>
</entry>
<entry>
<title>Revert part of revision 1.74 after bde reminded me of a detail I'd</title>
<updated>2003-12-11T07:46:08Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2003-12-11T07:46:08Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=56f9b096322f82081133597ec2f884a90e2e0a40'/>
<id>urn:sha1:56f9b096322f82081133597ec2f884a90e2e0a40</id>
<content type='text'>
forgotten about how sysctl works.  This removes a potential (though
not very likely) race that 1.74 introduced.
</content>
</entry>
<entry>
<title>Whitespace cleanup.</title>
<updated>2003-12-10T22:19:19Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2003-12-10T22:19:19Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=1b62c2410da2e731b3755a944133cefc3867cc39'/>
<id>urn:sha1:1b62c2410da2e731b3755a944133cefc3867cc39</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove debugging printf</title>
<updated>2003-12-10T22:14:32Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2003-12-10T22:14:32Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=dc4ed4fe112f15ca70e6a212c988d37cfc39b125'/>
<id>urn:sha1:dc4ed4fe112f15ca70e6a212c988d37cfc39b125</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix a couple of issues in the interrupt code:</title>
<updated>2003-12-10T22:11:51Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2003-12-10T22:11:51Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=7d268144f1915ad05d078e69cefb260f5d80b8a6'/>
<id>urn:sha1:7d268144f1915ad05d078e69cefb260f5d80b8a6</id>
<content type='text'>
 - Replace overly-complicated (and buggy) -a logic with a much simpler
   version: -a causes all interrupts to be displayed, otherwise only
   those that have occurred are displayed.  This removes the need for
   any MD code.

 - Instead of just making sure intrcnt is large enough, figure out the
   exact size it needs to be.  We derive nintr from this number, and we
   don't want to risk printing garbage.  Note that on sparc64, we end up
   printing garbage anyway because the names of non-existent interrupts
   are left uninitialized by the kernel.

Tested on:	alpha, i386, sparc64
</content>
</entry>
</feed>
