summaryrefslogtreecommitdiff
path: root/sutils/swapon.c
AgeCommit message (Collapse)Author
2016-03-24Use swapon path as pager partition pathSamuel Thibault
When /dev/hd* entries are parted-partition storeio, the store name is only the disk name, thus not unique. We should just use the path being used instead. * sutils/swapon.c (swaponoff): Use `file' instead of `store->name' to default_pager_paging_file. (main): Drop hardcoded "/dev/". * procfs/rootdir.c (rootdir_gc_swaps): Drop hardcoded "/dev/".
2016-03-24Fix swap information numbersSamuel Thibault
* procfs/rootdir.c (rootdir_gc_swaps): Fix default_pager_storage_info call parameter order. * sutils/swapon.c (main): Likewise.
2016-03-16Add getting swap information from swapon and procfsSamuel Thibault
* hurd/default_pager.defs (default_pager_storage_info): New RPC. * hurd/default_pager_reply.defs: Skip default_pager_storage_info RPC. * hurd/default_pager_types.h: Include <mach/machine/vm_types.h>. (vm_size_array_t): New type. * mach-defpager/priv.h (part): Add `name' field. * mach-defpager/default_pager.c (new_partition): Allocate and fill `part->name' field. Free it on error. (destroy_paging_partition): Free `part->name' field. (S_default_pager_storage_info): New function. * procfs/Makefile (SRCS): Add default_pagerUser.c. * procfs/rootdir.c: Include "default_pager_U.h". (rootdir_gc_swaps): New function. (rootdir_entries): Add "swaps" entry. * sutils/swapon.c: Include <argz.h> (show): New variable. (options): Add --show/-S option. (def_pager, dev_master): New variables (swaponoff): Move getting `def_pager' to... (get_def_pager): ... new function. (main): Support 'S' option. * trans/proxy-defpager.c (S_default_pager_storage_info): New function.
2013-07-06swapon: add -v, --verbose argumentJustus Winter
This patch adds a --verbose argument to swapon and swapoff to make it more compatible with the corresponding Linux' utilities. Note that our swapon is verbose by default and has a --quiet argument to make it quiet, so a --verbose argument on it's own does nothing at all. * sutils/swapon.c (main): Handle -v argument.
2013-07-01swapon: add -e/--ifexists optionPino Toscano
Add the same command line option as in util-linux' swapon to not consider an error if the device/file of a swap entry in fstab does not exist (and not when activating a device specified as argument to `swapon'). * sutils/swapon.c (ifexists): New variable. (options): Add the 'e' option. (parse_opt) <'e'>: Handle case. (swaponoff): New argument skipnotexisting. Return 0 if open_store fails with ENOENT and SKIPNOTEXISTING is on. (main): Adapt swaponoff calls with 0 as parameter for command line arguments, and IFEXISTS for swap entries from fstab.
2007-04-072007-04-07 Thomas Schwinge <tschwinge@gnu.org>Thomas Schwinge
* swapon.c (main, doc) [!SWAPOFF]: Unless overridden, consider a swap signature when deciding whether to add a paging device or not.
2002-06-262002-06-26 Roland McGrath <roland@frob.com>Roland McGrath
* swapon.c (swaponoff): Fix last change.
2002-06-252002-06-14 Roland McGrath <roland@frob.com>Roland McGrath
* swapon.c (swaponoff): If get_privileged_ports fails with EPERM, try to open /servers/default-pager instead.
2002-05-082002-05-07 Roland McGrath <roland@frob.com>Roland McGrath
* swapon.c (check_signature): Use %zu for size_t arg.
2001-02-282001-02-27 Roland McGrath <roland@frob.com>Roland McGrath
Use a new, more flexible RPC interface to the default pager. This allows swapon to do its own interpretation of Linux swap signature pages, and to support partial-device stores such as store_open will return for regular files on disk filesystems. * swapon.c: Include <hurd/default_pager.h>, not <mach/default_pager.h>. (ignore_signature, require_signature, quiet): New variables. (options): Add --silent, --no-signature, --require-signature. (main: parse_opt): Parse them. (check_signature): New function. (swaponoff): Use it unless --no-signature set, to get a remapped store using the pages indicated by the Linux signature page. Try new default_pager_paging_storage RPC first, using a possibly-remapped device store. If the default pager does not support that, fall back to the old protocol that only supports whole devices (and wherein the default pager itself interprets a Linux signature page). * Makefile (swapon, swapoff): Depend on default_pagerUser.o.
1999-11-191999-11-16 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath
* swapon.c (swaponoff): Check for a null default pager port.
1999-05-151999-05-15 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath
* swapon.c: Support -a (reading fstab).
1998-07-201998-07-19 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath
* swapon.c (main): Fix return type to int, and use return.
1997-07-15Doc fix.Miles Bader
1997-07-09Initial checkinMiles Bader