summaryrefslogtreecommitdiffstats
path: root/misc-utils/wipefs.c
diff options
context:
space:
mode:
authorKarel Zak2017-01-05 12:04:22 +0100
committerKarel Zak2017-01-05 12:38:43 +0100
commit11e88c86991b9cac57850856cef9fdad9a4c1e53 (patch)
tree5562e3292171e4fa73771999d1bdf42c62983954 /misc-utils/wipefs.c
parentlibfdisk: (sun) use self_label() (diff)
downloadkernel-qcow2-util-linux-11e88c86991b9cac57850856cef9fdad9a4c1e53.tar.gz
kernel-qcow2-util-linux-11e88c86991b9cac57850856cef9fdad9a4c1e53.tar.xz
kernel-qcow2-util-linux-11e88c86991b9cac57850856cef9fdad9a4c1e53.zip
wipefs: unused parameter [-Wunused-parameter]
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils/wipefs.c')
-rw-r--r--misc-utils/wipefs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/misc-utils/wipefs.c b/misc-utils/wipefs.c
index 2845b18f7..e6c417ce7 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);