static int cannot_find(const char *special);
+#define PRINT_USAGE_SPECIAL(_fp) \
+ fprintf(_fp, _( \
+ "Special parameter:\n" \
+ " {-L label | LABEL=label} volume LABEL\n" \
+ " {-U uuid | UUID=uuid} volume UUID\n" \
+ " <file> swap file\n" \
+ " <device> swap device\n\n"))
+
static void
swapon_usage(FILE *fp, int n) {
- fprintf(fp, _("usage: %1$s [-hV]\n"
- " %1$s -a [-e] [-v]\n"
- " %1$s [-v] [-p priority] special|LABEL=volume_name ...\n"
- " %1$s [-s]\n"),
- progname);
+ fprintf(fp, _("\nUsage:\n"
+ " %1$s -a [-e] [-v] enable all swaps from /etc/fstab\n"
+ " %1$s [-v] [-p priority] <special> enable swap\n"
+ " %1$s [-s] display swap usage summary\n"
+ " %1$s [-h] display help\n"
+ " %1$s [-V] display version\n\n"), progname);
+
+ PRINT_USAGE_SPECIAL(fp);
+
exit(n);
}
static void
swapoff_usage(FILE *fp, int n) {
- fprintf(fp, _("usage: %1$s [-hV]\n"
- " %1$s -a [-v]\n"
- " %1$s [-v] special ...\n"),
- progname);
+ fprintf(fp, _("\nUsage:\n"
+ " %1$s -a [-v] disable all swaps\n"
+ " %1$s [-v] <special> disable given swap\n"
+ " %1$s [-h] display help\n"
+ " %1$s [-V] display version\n\n"), progname);
+
+ PRINT_USAGE_SPECIAL(fp);
+
exit(n);
}