From: Sami Kerola <kerolasa@iki.fi>
To: util-linux@vger.kernel.org
Cc: kerolasa@iki.fi
Subject: [PATCH] swaplabel: move swapon-common to include directory
Date: Sat, 26 Jul 2014 11:53:06 +0100 [thread overview]
Message-ID: <1406371986-16508-1-git-send-email-kerolasa@iki.fi> (raw)
This fixes the following compiler warning.
disk-utils/swaplabel.c:175:2: warning: implicit declaration of function
'get_swap_prober' [-Wimplicit-function-declaration]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
disk-utils/swaplabel.c | 1 +
include/swapon-common.h | 28 ++++++++++++++++++++++++++++
sys-utils/swapon-common.h | 28 ----------------------------
3 files changed, 29 insertions(+), 28 deletions(-)
create mode 100644 include/swapon-common.h
delete mode 100644 sys-utils/swapon-common.h
diff --git a/disk-utils/swaplabel.c b/disk-utils/swaplabel.c
index 809c365..a7cccc4 100644
--- a/disk-utils/swaplabel.c
+++ b/disk-utils/swaplabel.c
@@ -29,6 +29,7 @@
#include "closestream.h"
#include "all-io.h"
#include "swapheader.h"
+#include "swapon-common.h"
#include "strutils.h"
#include "nls.h"
diff --git a/include/swapon-common.h b/include/swapon-common.h
new file mode 100644
index 0000000..da58e19
--- /dev/null
+++ b/include/swapon-common.h
@@ -0,0 +1,28 @@
+#ifndef UTIL_LINUX_SWAPON_COMMON_H
+#define UTIL_LINUX_SWAPON_COMMON_H
+
+#include <blkid.h>
+#include <libmount.h>
+
+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);
+
+blkid_probe get_swap_prober(const char *devname);
+
+#endif /* UTIL_LINUX_SWAPON_COMMON_H */
diff --git a/sys-utils/swapon-common.h b/sys-utils/swapon-common.h
deleted file mode 100644
index da58e19..0000000
--- a/sys-utils/swapon-common.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef UTIL_LINUX_SWAPON_COMMON_H
-#define UTIL_LINUX_SWAPON_COMMON_H
-
-#include <blkid.h>
-#include <libmount.h>
-
-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);
-
-blkid_probe get_swap_prober(const char *devname);
-
-#endif /* UTIL_LINUX_SWAPON_COMMON_H */
--
2.0.3
next reply other threads:[~2014-07-26 10:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-26 10:53 Sami Kerola [this message]
2014-07-28 10:29 ` [PATCH] swaplabel: move swapon-common to include directory Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1406371986-16508-1-git-send-email-kerolasa@iki.fi \
--to=kerolasa@iki.fi \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).