summaryrefslogtreecommitdiffstats
path: root/sys-utils/swapon-common.h
diff options
context:
space:
mode:
authorSami Kerola2014-07-01 22:40:04 +0200
committerKarel Zak2014-07-22 12:17:20 +0200
commit5db57cfc469b45ada0162a64d627ce25a3d2431f (patch)
tree23d67c74e1555511670244087243e5d8faf86a2e /sys-utils/swapon-common.h
parentMerge branch 'rename' of git://github.com/kerolasa/lelux-utiliteetit (diff)
downloadkernel-qcow2-util-linux-5db57cfc469b45ada0162a64d627ce25a3d2431f.tar.gz
kernel-qcow2-util-linux-5db57cfc469b45ada0162a64d627ce25a3d2431f.tar.xz
kernel-qcow2-util-linux-5db57cfc469b45ada0162a64d627ce25a3d2431f.zip
swapon: share get_swap_prober() with swaplabel to print uuid and label
The swapon(8) listing was almost complete, apart from label and uuid. This change moves the code from swaplabel(8) to shared scope to be used for printouts in other swap commands, such as swapon. Adding this feature to lsblk(8) was a consideration, but lsblk is not interested of swapfiles, so the swapon seems like a better option to add this information. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'sys-utils/swapon-common.h')
-rw-r--r--sys-utils/swapon-common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys-utils/swapon-common.h b/sys-utils/swapon-common.h
index 53ba15e0e..da58e199d 100644
--- a/sys-utils/swapon-common.h
+++ b/sys-utils/swapon-common.h
@@ -1,6 +1,7 @@
#ifndef UTIL_LINUX_SWAPON_COMMON_H
#define UTIL_LINUX_SWAPON_COMMON_H
+#include <blkid.h>
#include <libmount.h>
extern struct libmnt_cache *mntcache;
@@ -22,5 +23,6 @@ extern void add_uuid(const char *uuid);
extern const char *get_uuid(size_t i);
extern size_t numof_uuids(void);
+blkid_probe get_swap_prober(const char *devname);
#endif /* UTIL_LINUX_SWAPON_COMMON_H */