summaryrefslogtreecommitdiff
path: root/sbin/swapctl
AgeCommit message (Collapse)Author
2015-12-10Remove NULL-checks before free(). ok tb@mmcc
2015-09-15update spacing in usage(); reminded by jmc@Ingo Schwarze
2015-09-15fix markup of the -t argumentIngo Schwarze
2015-08-20<stdlib.h> is included, so do not need to cast result fromTheo de Raadt
malloc, calloc, realloc* ok krw millert
2015-08-14switch from system(3) to vfork(2)+execl(2) for invoking mount_nfs(8) when fstabSebastien Marie
contains option for swapping to NFS files. ok millert@
2015-04-18Convert many atoi() calls to strtonum(), adding range checks and failureTheo de Raadt
handling along the way. Reviews by Brendan MacDonell, Jeremy Devenport, florian, doug, millert
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
2014-08-10Only need <stdint.h> and not all of <inttypes.h> herePhilip Guenther
2013-07-16Add missing .Mt macros for AUTHORS email addresses.Ingo Schwarze
From Jan Stary <hans at stare dot cz>. ok jmc@
2011-06-24swapctl -s was showing 1k blocks, regardless of -k. so fix this by showingJasper Lievisse Adriaanse
1k block when we're supposed to. fix from tyr@poczta.fm in pr 6609 ok otto@
2011-04-17a little more tweaking; ok krwJason McIntyre
2011-04-17Tweak verbiage, bring examples up to date.Kenneth R Westerback
Suggestions from deraadt@ and jmc@. ok jmc@
2010-12-29Fix swapctl -A with DUIDs in /etc/fstab, and plug a small memory leak.Stefan Sperling
ok jsing@ (who also pointed out a DPADD tweak missing from my diff)
2010-09-03add an EXIT STATUS section for /sbin;Jason McIntyre
2007-11-26if no arguments given, assume a nice default; ok miod jakemsr deannaTheo de Raadt
2007-07-26use calloc() instead of malloc(); zinovik@cs.karelia.ruTheo de Raadt
2007-07-17sync swapon usage(); from Igor ZinovikJason McIntyre
2007-07-17do not try to list which options go with -p: the list is currently out ofJason McIntyre
date, and even if i update it, it will obsolete itself if we add or remove options. it works when it makes sense, like it should. after a request from Igor Zinovik
2007-07-16Remove dead code and fix incorrect comment. From Igor Zinovik.Todd C. Miller
2007-07-16No need to include <sys/param.h> or <errno.h>. Also reorder includesTodd C. Miller
while here. Adapted from a diff by Igor Zinovik.
2007-05-31convert to new .Dd format;Jason McIntyre
2007-05-27fix .Xr's to mount_vnd(8)Alexander von Gernler
suggested and ok jmc@
2006-08-24add .Ex;Jason McIntyre
2006-08-24- expand the text on priorities: from netbsdJason McIntyre
- move WARNINGS to BUGS: from netbsd
2006-08-24reword a scary sentence;Jason McIntyre
2006-08-24sort options;Jason McIntyre
2005-04-12handle snprintf potential -1 caseTheo de Raadt
2004-01-12- avoid variable sized static array (from millert@)Anil Madhavapeddy
- check for snprintf overflow - errx -> err for strdup commit #1000!
2003-09-26check strdup failure; ok anil millertTheo de Raadt
2003-06-03- section reorderJason McIntyre
- some mdoc fixes
2003-05-10document that kernel automatically handles first swap partitionJason McIntyre
("swap_device" in swapctl -l) and does not need to be added to /etc/fstab. krw@, fries@, rohee@, millert@, henning@ ok.
2003-03-03Fix inaccuracies in comments.Miod Vallat
2003-02-13typos;Jason McIntyre
setextattr(8): example markus@ spamd(8): someone else found some of these on bugs/misc, but for the life of me i can't find out who pf.conf(5): from openbsd@davidkrause.com raidctl(8): from ian@darwinsys.com
2002-12-19no youTheo de Raadt
2002-07-03ansiTheo de Raadt
2002-05-15typo in comment.Artur Grabowski
From Sam Smith S at mSmith.net
2002-05-15Kill commented out stubs for swapoff.Artur Grabowski
2002-05-15kill the reference to swapoff.Artur Grabowski
2002-02-16Part one of userland __P removal. Done with a simple regexp with some minor ↵Todd C. Miller
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
2001-12-21Initial patch for a new mdoc issue.Mike Pechkin
Powered by @mantoya: o) kill extra line in the end of file; o) kill extra space in the end of line; o) replace blank lines with .Pp; millert@ ok
2001-08-02o) .Sh AUTHOR -> .Sh AUTHORS;Mike Pechkin
o) .Sh EXAMPLE -> .Sh EXAMPLES; o) Delete .Sh OPTIONS. Text moved to .Sh DESCRIPTION; millert@ ok
2001-07-26Remove BUGS section, swapoff now works. ok art@Peter Valchev
2001-06-04return from main() don't exitMichael Shalayeff
2001-06-02Various swapctl(8) improvements:Miod Vallat
- don't print an error message when trying to enable swap on an already active swap point. - better handling of -t option. - silently ignores swap points which are neither block devices nor regular files, and don't consider swap points not starting with /dev/ as valid block devices, when invoked with -A. Work by deraadt@ and myself, ok millert@
2001-04-23Various man page fixes and improvements from gluk@Aaron Campbell
2001-03-09PATH_MAX+1 is wrong. Not cranking libc/libc_r majors over this, since they ↵Theo de Raadt
just got cranked a little while ago. discussion with millert
2000-11-09Change all option list specifications to ".Bl -tag -width Ds". Most manAaron Campbell
pages just needed their -width parameter tweaked to "Ds", which provides a nice width of 6 constant characters. For consistency more than anything.
2000-06-30warnx?/errx? paranoia (use "%s" not a bare string unless it is aTodd C. Miller
constant). These are not security holes but it is worth fixing them anyway both for robustness and so folks looking for examples in the tree are not misled into doing something potentially dangerous. Furthermore, it is a bad idea to assume that pathnames will not include '%' in them and that error routines don't return strings with '%' in them (especially in light of the possibility of locales).
2000-06-28Remove information that's NetBSD-specific.Artur Grabowski
2000-04-13example fstab entryTheo de Raadt