Commit Graph

6 Commits

Author SHA1 Message Date
Benno Schulenberg 451dbcfae1 textual: add a docstring to most of the utilities
This adds a concise description of a tool to its usage text.

A first form of this patch was proposed by Steven Honeyman
(see http://www.spinics.net/lists/util-linux-ng/msg09994.html).

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2015-01-06 11:27:38 +01:00
Karel Zak 52f2fd9bcc swapoff: swapoff swap files by LABEL and UUID
# swapon --show=NAME,UUID
 NAME                   UUID
 /dev/sda3              8d52fca3-bf48-41d6-b826-2315e518a305
 /home/fs-images/2g.img 6fa72b96-b802-441f-a31c-091d65c0212c

 # swapoff UUID=6fa72b96-b802-441f-a31c-091d65c0212c
 swapoff: cannot find the device for UUID=6fa72b96-b802-441f-a31c-091d65c0212c

Reported-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-11-07 12:08:11 +01:00
Karel Zak 6195f9e6fa misc: use libmnt_cache reference counting
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-21 14:38:38 +02:00
Karel Zak 7cf6a65476 swapoff: cleanup usage() and includes
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-04-18 12:38:03 +02:00
Karel Zak e7b63bea04 swapoff: use libmount to parse fstab
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-04-18 12:22:11 +02:00
Karel Zak 6cf8d46cee swapoff: move code from swapon.c to swapoff.c
* multipurpose binaries (symlinks) suck when used with autotools
 * swapoff shares small subset of the code with swapon
 * usage() and 'struct option' is unnecessary complex when shared
 * shorter and simple code is easer to maintain...

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-04-18 11:43:42 +02:00