From 11e88c86991b9cac57850856cef9fdad9a4c1e53 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 5 Jan 2017 12:04:22 +0100 Subject: [PATCH] wipefs: unused parameter [-Wunused-parameter] Signed-off-by: Karel Zak --- misc-utils/wipefs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/misc-utils/wipefs.c b/misc-utils/wipefs.c index 2845b18f7d..e6c417ce72 100644 --- a/misc-utils/wipefs.c +++ b/misc-utils/wipefs.c @@ -348,9 +348,9 @@ err: err(EXIT_FAILURE, _("%s: failed to create a signature backup"), fname); } +#ifdef BLKRRPART static void rereadpt(int fd, const char *devname) { -#ifdef BLKRRPART struct stat st; if (fstat(fd, &st) || !S_ISBLK(st.st_mode)) @@ -359,8 +359,8 @@ static void rereadpt(int fd, const char *devname) errno = 0; ioctl(fd, BLKRRPART); printf(_("%s: calling ioctl to re-read partition table: %m\n"), devname); -#endif } +#endif static struct wipe_desc * do_wipe(struct wipe_desc *wp, const char *devname, int flags) @@ -436,8 +436,10 @@ do_wipe(struct wipe_desc *wp, const char *devname, int flags) fsync(blkid_probe_get_fd(pr)); +#ifdef BLKRRPART if (reread && (mode & O_EXCL)) rereadpt(blkid_probe_get_fd(pr), devname); +#endif close(blkid_probe_get_fd(pr)); blkid_free_probe(pr); -- 2.47.3