diff options
author | Thomas Schwinge <tschwinge@gnu.org> | 2007-04-07 10:45:02 +0000 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gnu.org> | 2007-04-07 10:45:02 +0000 |
commit | deabdfb882f6e755a8b21a54ac8ab53de90affbb (patch) | |
tree | bd0675295f8e24439d74f32ae273ce63f48ec89b /sutils | |
parent | 582c10fdfc74d1fcef04230983c679683d4d78ca (diff) |
2007-04-07 Thomas Schwinge <tschwinge@gnu.org>
* swapon.c (main, doc) [!SWAPOFF]: Unless overridden, consider a
swap signature when deciding whether to add a paging device or not.
Diffstat (limited to 'sutils')
-rw-r--r-- | sutils/ChangeLog | 5 | ||||
-rw-r--r-- | sutils/swapon.c | 24 |
2 files changed, 25 insertions, 4 deletions
diff --git a/sutils/ChangeLog b/sutils/ChangeLog index 55b2e203..71edeb8c 100644 --- a/sutils/ChangeLog +++ b/sutils/ChangeLog @@ -1,6 +1,9 @@ 2007-04-07 Thomas Schwinge <tschwinge@gnu.org> - * MAKEDEV.sh (mkdev): Specify the creation of `lpr[0-9' devices. + * swapon.c (main, doc) [!SWAPOFF]: Unless overridden, consider a + swap signature when deciding whether to add a paging device or not. + + * MAKEDEV.sh (mkdev): Specify the creation of `lpr[0-9]' devices. 2002-09-17 Marcus Brinkmann <marcus@gnu.org> diff --git a/sutils/swapon.c b/sutils/swapon.c index acacf48c..c0c773bd 100644 --- a/sutils/swapon.c +++ b/sutils/swapon.c @@ -1,7 +1,10 @@ /* Add/remove paging devices - Copyright (C) 1997,98,99,2000,01,02 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2007 + Free Software Foundation, Inc. + Written by Miles Bader <miles@gnu.org> + This file is part of the GNU Hurd. The GNU Hurd is free software; you can redistribute it and/or @@ -55,11 +58,17 @@ static struct argp_option options[] = }; static char *args_doc = "DEVICE..."; +static char *doc = #ifdef SWAPOFF -static char *doc = "Stop paging on DEVICE..."; + "Stop paging on DEVICE..." + "\vUnless overridden, a swap space signature is not considered when deciding" + " whether to remove a paging device or not." #else -static char *doc = "Start paging onto DEVICE..."; + "Start paging onto DEVICE..." + "\vUnless overridden, only devices with a valid (Linux) swap space signature" + " are considered when deciding whether to add a paging device or not." #endif +; #define verbose(fmt, arg...) \ if (quiet_now) ((void)0); else error (0, 0, fmt ,##arg) @@ -487,6 +496,15 @@ main (int argc, char *argv[]) } struct argp argp = {options, parse_opt, args_doc, doc}; + /* See the documentation string DOC. */ +#ifdef SWAPOFF + ignore_signature = 1; + require_signature = 0; +#else + ignore_signature = 0; + require_signature = 1; +#endif + argp_parse (&argp, argc, argv, ARGP_IN_ORDER, 0, 0); if (do_all) |