Signed-off-by: Petr Uzel <petr.uzel@xxxxxxx> --- misc-utils/wipefs.c | 19 +------------------ 1 files changed, 1 insertions(+), 18 deletions(-) diff --git a/misc-utils/wipefs.c b/misc-utils/wipefs.c index 4ab3615..079a9bc 100644 --- a/misc-utils/wipefs.c +++ b/misc-utils/wipefs.c @@ -36,6 +36,7 @@ #include "nls.h" #include "xalloc.h" #include "strutils.h" +#include "writeall.h" struct wipe_desc { loff_t offset; /* magic string offset */ @@ -213,24 +214,6 @@ read_offsets(struct wipe_desc *wp, const char *fname, int zap) } static int -write_all(int fd, const void *buf, size_t count) -{ - while(count) { - ssize_t tmp; - - errno = 0; - tmp = write(fd, buf, count); - if (tmp > 0) { - count -= tmp; - if (count) - buf += tmp; - } else if (errno != EINTR && errno != EAGAIN) - return -1; - } - return 0; -} - -static int do_wipe_offset(int fd, struct wipe_desc *wp, const char *fname, int noact) { char buf[BUFSIZ]; -- 1.7.1 Petr -- Petr Uzel IRC: ptr_uzl @ freenode
Attachment:
pgpJHtIWYLt_u.pgp
Description: PGP signature