summaryrefslogtreecommitdiff
path: root/sutils/swapon.c
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@gnu.org>2007-04-07 10:45:02 +0000
committerThomas Schwinge <tschwinge@gnu.org>2007-04-07 10:45:02 +0000
commitdeabdfb882f6e755a8b21a54ac8ab53de90affbb (patch)
treebd0675295f8e24439d74f32ae273ce63f48ec89b /sutils/swapon.c
parent582c10fdfc74d1fcef04230983c679683d4d78ca (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/swapon.c')
-rw-r--r--sutils/swapon.c24
1 files changed, 21 insertions, 3 deletions
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)