From 18b3e5495b2bd1d89286f452d1d2952e065dfecd Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 22 Sep 2014 13:16:25 +0200 Subject: swapon: split swapon-common.c swapon - requires libmount and libblkid swapoff - requires libmount swaplabel - requires libblkid This patch add lib/swapprober.c with blkid stuff for swap. It allows to use and link libblkid only when necessary. Signed-off-by: Karel Zak --- sys-utils/swapon-common.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sys-utils/swapon-common.h (limited to 'sys-utils/swapon-common.h') diff --git a/sys-utils/swapon-common.h b/sys-utils/swapon-common.h new file mode 100644 index 000000000..d1b679f2c --- /dev/null +++ b/sys-utils/swapon-common.h @@ -0,0 +1,25 @@ +#ifndef UTIL_LINUX_SWAPON_COMMON_H +#define UTIL_LINUX_SWAPON_COMMON_H + +#include + +extern struct libmnt_cache *mntcache; + +extern struct libmnt_table *get_fstab(void); +extern struct libmnt_table *get_swaps(void); +extern void free_tables(void); + +extern int match_swap(struct libmnt_fs *fs, void *data); +extern int is_active_swap(const char *filename); + +extern int cannot_find(const char *special); + +extern void add_label(const char *label); +extern const char *get_label(size_t i); +extern size_t numof_labels(void); + +extern void add_uuid(const char *uuid); +extern const char *get_uuid(size_t i); +extern size_t numof_uuids(void); + +#endif /* UTIL_LINUX_SWAPON_COMMON_H */ -- cgit v1.2.3-55-g7522