summaryrefslogtreecommitdiffstats
path: root/sbin/swapon
Commit message (Collapse)AuthorAgeFilesLines
* Call va_end on ap when vsnprintf fails in run_cmd(..) to clean upngie2015-12-091-0/+1
| | | | | | | | the variable state MFC after: 1 week Reported by: cppcheck Sponsored by: EMC / Isilon Storage Division
* Allow to disable BIO_DELETE passthru in fstab for swap-on-geli devices bypjd2015-08-081-4/+6
| | | | | | | passing 'notrim' option. PR: 198863 Submitted by: Matthew D. Fuller fullermd at over-yonder dot net
* Add META_MODE support.sjg2015-06-131-0/+19
|\ | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp
| * dirdeps.mk now sets DEP_RELDIRsjg2015-06-081-2/+0
| |
| * Merge sync of headsjg2015-05-271-2/+1
| |\ | |/ |/|
| * Merge from head@274682sjg2014-11-191-8/+1
| |\
| * | Updated dependenciessjg2014-05-161-1/+0
| | |
| * | Updated dependenciessjg2014-05-101-0/+2
| | |
| * | Merge headsjg2014-04-282-7/+6
| |\ \
| * \ \ Merge headsjg2013-09-111-58/+59
| |\ \ \
| * \ \ \ Merge from headsjg2013-09-052-29/+574
| |\ \ \ \
| * | | | | Updated dependenciessjg2013-03-111-0/+1
| | | | | |
| * | | | | Updated dependenciessjg2013-02-161-2/+0
| | | | | |
| * | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-221-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net>
* | | | | | Convert sbin/ to LIBADDbapt2014-11-251-2/+1
| |_|_|_|/ |/| | | | | | | | | | | | | | Reduce overlinking
* | | | | Do not add late flag when file= is specified because it has a badhrs2014-10-101-8/+1
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | side-effect. The specified file should exist before the fstab line. Reported by: wblock (long time ago) MFC after: 1 day
* | | | swapon: Fix buffer overflow when configuring encrypted swap on GBDE.jilles2013-12-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | PR: bin/184950 Tested by: Radim Kolar MFC after: 3 days
* | | | - Purge one more reference to ad(4)[1].pluknet2013-11-221-6/+4
| |_|/ |/| | | | | | | | | | | | | | | | | - NSWAPDEV limit has gone. Noticed by: Sergey V. Dyatko [1] MFC after: 1 week
* | | Style clean-ups.hrs2013-09-051-54/+48
| | | | | | | | | | | | Reviewed by: md5
* | | Enable "late" option when a file= option is specified in /etc/fstab.hrs2013-09-051-4/+11
| |/ |/| | | | | | | | | The file= option requires rw mount where the backing store exists but it does not work because rc.d/swap runs before rc.d/fsck. Reported by: wblock
* | Make two buffer variables static for now. It is not safe todelphij2013-07-311-1/+1
| | | | | | | | | | | | reference stack memory after return. MFC after: 2 weeks
* | Plug a memory leak.delphij2013-07-021-0/+7
| |
* | Correct a typo in comment.delphij2013-07-011-1/+1
| |
* | - Modify swapon(8) so that it uses most of geli(8) defaults for swap,delphij2013-06-291-160/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | which is presently: AES-XTS, no authentication. Create provider with pagesize as sectorsize by default. - Rewrite parsing code for geli(8)-backed swap options, now options are required to be exact match, and unrecognized options will trigger a warning. - Don't initialize GELI device if it's already initialized. This restores previous behavior. - Don't duplicate file descriptor when working with geli(8) and gbde(8) as there is no need to communicate with the utility other than exit status. - When calling swap_on_off_* routines, which_prog can only be SWAP_ON or SWAP_OFF. Eliminate unneeded case branches by replacing switch with if's. - Plug a few memory leaks. Reviewed by: hrs (but bugs are mine) MFC after: 1 week X-MFC-with: r252310, r252332, r252345
* | Fix build with gcc.hrs2013-06-281-3/+5
| |
* | Fix build.hrs2013-06-281-11/+11
| | | | | | | | Spotted by: gjb
* | - Add vnode-backed swap space specification support. This is enabled whenhrs2013-06-272-29/+566
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | device names "md" or "md[0-9]*" and a "file" option are specified in /etc/fstab like this: md none swap sw,file=/swap.bin 0 0 - Add GBDE/GELI encrypted swap space specification support, which rc.d/encswap supported. The /etc/fstab lines are like the following: /dev/ada1p1.bde none swap sw 0 0 /dev/ada1p2.eli none swap sw 0 0 .eli devices accepts aalgo, ealgo, keylen, and sectorsize as options. swapctl(8) can understand an encrypted device in the command line like this: # swapctl -a /dev/ada2p1.bde - "-L" flag is added to support "late" option to defer swapon until rc.d/mountlate runs. - rc.d script change: rc.d/encswap -> removed rc.d/addswap -> just display a warning message if $swapfile is defined rc.d/swap1 -> renamed to rc.d/swap rc.d/swaplate -> newly added to support "late" option These changes alleviate a race condition between device creation/removal and swapon/swapoff. MFC after: 1 week Reviewed by: wblock (manual page)
* Add missing static keywords for global variables to tools in sbin/.ed2011-11-041-1/+1
| | | | | | These tools declare global variables without using the static keyword, even though their use is limited to a single C-file, or without placing an extern declaration of them in the proper header file.
* Build swapon with WARNS=6.ed2011-10-252-6/+5
| | | | Don't use a variable called stat, because it collides with stat(2).
* Add new option -F to specify alternative location of the /etc/fstabsobomax2011-10-252-4/+29
| | | | | | file. MFC after: 1 month
* Raise WARNS for various tools where possible.ed2010-01-171-1/+1
| | | | Submitted by: Marius Nünnerich <marius@nuenneri.ch>
* Switch the default WARNS level for sbin/ to 6.ru2009-10-191-0/+1
| | | | Submitted by: Ulrich Spörlein
* Add a -q flag to swapon(8) to suppress informational messages. Use it inmtm2008-06-232-9/+24
| | | | | rc.d. Note: errors are not affected by this flag.
* - Change the meaning of -h flag from giving the output in megabytes topjd2008-05-203-21/+67
| | | | | | | giving the output in a human-readable form. This behaviour is consistent with most of system tools. - Add -m and -g options to give output in megabytes and gigabytes respectively.
* Sync program's usage() with manpage's SYNOPSIS.ru2005-02-102-9/+5
|
* Sort sections.ru2005-01-181-10/+10
|
* Don't include sys/user.h merely for its side-effect of recursivelydas2004-11-271-1/+1
| | | | including other headers.
* Remove advertising clause from University of California Regent's license,markm2004-04-092-8/+0
| | | | | | per letter dated July 22, 1999. Approved by: core, imp
* Make NULL a (void*)0 whereever possible, and fix the warnings(-Werror)markm2004-03-051-1/+1
| | | | | | | | | | | | | | | that this provokes. "Wherever possible" means "In the kernel OR NOT C++" (implying C). There are places where (void *) pointers are not valid, such as for function pointers, but in the special case of (void *)0, agreement settles on it being OK. Most of the fixes were NULL where an integer zero was needed; many of the fixes were NULL where ascii <nul> ('\0') was needed, and a few were just "other". Tested on: i386 sparc64
* Use __FBSDID() to quiet GCC 3.3 warnings.obrien2003-05-031-4/+4
|
* Spell "utilities" correctly.keramida2003-02-281-1/+1
|
* More fixes.ru2003-02-251-6/+8
| | | | | Submitted by: Andy Farkas <andyf@speednet.com.au> Reviewed by: das
* mdoc(7) police: Tidy up.ru2003-02-241-40/+58
|
* Clarify about NSWAPDEV, add a DIAGNOSTICS section pointing todas2003-02-241-3/+8
| | | | | | swapon(2), and correct HISTORY. Reviewed by: mike (mentor)
* - Add a clearer error message for the case where swapon hits thedas2003-02-241-3/+9
| | | | | | | | | | | NSWAPDEV limit. - Don't warn about devices that are not in use in 'swapoff -a'. - Re-add behavior mistakenly removed in revision 1.44: If using 'swapon -a', do not warn if the device is already in use. PR: 46633 Submitted by: Andy Farkas <andyf@speednet.com.au> (in part) Reviewed by: mike (mentor)
* Remove hack from rev 1.15; getbsize(3)'s original interface has beenmike2002-12-301-3/+1
| | | | restored.
* Make the first argument to getbsize(3) a `size_t *'. This is a hackmike2002-12-301-3/+4
| | | | since getbsize(3) should have `int *' as its first parameter.
* Add 'swapctl' - as a hardlink to swapon/swapoff, and augment swapon withdillon2002-12-283-65/+257
| | | | | | | | | | | swapctl functionality. The idea is to create a swapctl command that is fairly close to the OpenBSD and NetBSD version. FreeBSD does not implement swap priority (and it would be a mistake if we did) so we didn't bother with that part of it. Submitted by: Eirik Nygaard <eirikn@bluezone.no> Augmented by: dillon (extensively) Reviewed by: David Schultz <dschultz@uclink.Berkeley.EDU>
* This is David Schultz's swapoff code which I am finally able to commit.dillon2002-12-153-26/+56
| | | | | | | This should be considered highly experimental for the moment. Submitted by: David Schultz <dschultz@uclink.Berkeley.EDU> MFC after: 3 weeks
* s/filesystem/file system/g as discussed on -developerstrhodes2002-08-211-1/+1
|
OpenPOWER on IntegriCloud