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>
This commit is contained in:
parent
24c329bbb3
commit
3097f788f9
|
@ -802,7 +802,6 @@ main(int argc, char **argv)
|
||||||
/*
|
/*
|
||||||
* Erase
|
* Erase
|
||||||
*/
|
*/
|
||||||
size_t i;
|
|
||||||
ctl.ndevs = argc - optind;
|
ctl.ndevs = argc - optind;
|
||||||
|
|
||||||
while (optind < argc) {
|
while (optind < argc) {
|
||||||
|
@ -811,10 +810,11 @@ main(int argc, char **argv)
|
||||||
ctl.ndevs--;
|
ctl.ndevs--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef BLKRRPART
|
||||||
/* Re-read partition tables on whole-disk devices. This is
|
/* Re-read partition tables on whole-disk devices. This is
|
||||||
* postponed until all is done to avoid conflicts.
|
* 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];
|
char *devname = ctl.reread[i];
|
||||||
int fd = open(devname, O_RDONLY);
|
int fd = open(devname, O_RDONLY);
|
||||||
|
|
||||||
|
@ -824,6 +824,7 @@ main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
free(ctl.reread);
|
free(ctl.reread);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue