diff options
author | Ruediger Meier | 2018-06-25 15:08:55 +0200 |
---|---|---|
committer | Ruediger Meier | 2018-06-25 16:49:54 +0200 |
commit | 3097f788f99804957a8ffb3797ed49cb599daeb7 (patch) | |
tree | fb208ac8d4194e926cc34e6e5452e6c2fe5152f2 /misc-utils | |
parent | lib/path: remove unused expression (diff) | |
download | kernel-qcow2-util-linux-3097f788f99804957a8ffb3797ed49cb599daeb7.tar.gz kernel-qcow2-util-linux-3097f788f99804957a8ffb3797ed49cb599daeb7.tar.xz kernel-qcow2-util-linux-3097f788f99804957a8ffb3797ed49cb599daeb7.zip |
wipefs: add missing ifdef
Seen on OSX:
misc-utils/wipefs.c:822:5: warning: implicit declaration of function 'rereadpt' is invalid in C99 [-Wimplicit-function-declaration]
rereadpt(fd, devname);
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'misc-utils')
-rw-r--r-- | misc-utils/wipefs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/misc-utils/wipefs.c b/misc-utils/wipefs.c index 49c5c8ca1..13a720e85 100644 --- a/misc-utils/wipefs.c +++ b/misc-utils/wipefs.c @@ -802,7 +802,6 @@ main(int argc, char **argv) /* * Erase */ - size_t i; ctl.ndevs = argc - optind; while (optind < argc) { @@ -811,10 +810,11 @@ main(int argc, char **argv) ctl.ndevs--; } +#ifdef BLKRRPART /* Re-read partition tables on whole-disk devices. This is * postponed until all is done to avoid conflicts. */ - for (i = 0; i < ctl.nrereads; i++) { + for (size_t i = 0; i < ctl.nrereads; i++) { char *devname = ctl.reread[i]; int fd = open(devname, O_RDONLY); @@ -824,6 +824,7 @@ main(int argc, char **argv) } } free(ctl.reread); +#endif } return EXIT_SUCCESS; } |