* [PATCH] swaplabel: move swapon-common to include directory
@ 2014-07-26 10:53 Sami Kerola
2014-07-28 10:29 ` Karel Zak
0 siblings, 1 reply; 2+ messages in thread
From: Sami Kerola @ 2014-07-26 10:53 UTC (permalink / raw)
To: util-linux; +Cc: kerolasa
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] swaplabel: move swapon-common to include directory
2014-07-26 10:53 [PATCH] swaplabel: move swapon-common to include directory Sami Kerola
@ 2014-07-28 10:29 ` Karel Zak
0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2014-07-28 10:29 UTC (permalink / raw)
To: Sami Kerola; +Cc: util-linux
On Sat, Jul 26, 2014 at 11:53:06AM +0100, Sami Kerola wrote:
> 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 ----------------------------
and modify include/Makemodule.ac :-)
> 3 files changed, 29 insertions(+), 28 deletions(-)
> create mode 100644 include/swapon-common.h
> delete mode 100644 sys-utils/swapon-common.h
Applied, thanks.
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-07-28 10:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-26 10:53 [PATCH] swaplabel: move swapon-common to include directory Sami Kerola
2014-07-28 10:29 ` Karel Zak
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).