=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/signify/signify.c,v retrieving revision 1.31 retrieving revision 1.32 diff -c -r1.31 -r1.32 *** src/usr.bin/signify/signify.c 2014/01/13 01:40:43 1.31 --- src/usr.bin/signify/signify.c 2014/01/13 09:41:16 1.32 *************** *** 1,4 **** ! /* $OpenBSD: signify.c,v 1.31 2014/01/13 01:40:43 tedu Exp $ */ /* * Copyright (c) 2013 Ted Unangst * --- 1,4 ---- ! /* $OpenBSD: signify.c,v 1.32 2014/01/13 09:41:16 espie Exp $ */ /* * Copyright (c) 2013 Ted Unangst * *************** *** 119,130 **** readall(int fd, void *buf, size_t len, const char *filename) { ssize_t x; ! ! x = read(fd, buf, len); ! if (x == -1) { ! err(1, "read from %s", filename); ! } else if (x != len) { ! errx(1, "short read from %s", filename); } } --- 119,133 ---- readall(int fd, void *buf, size_t len, const char *filename) { ssize_t x; ! ! while (len != 0) { ! x = read(fd, buf, len); ! if (x == -1) ! err(1, "read from %s", filename); ! else { ! len -= x; ! buf += x; ! } } } *************** *** 199,210 **** writeall(int fd, const void *buf, size_t len, const char *filename) { ssize_t x; ! ! x = write(fd, buf, len); ! if (x == -1) { ! err(1, "write to %s", filename); ! } else if (x != len) { ! errx(1, "short write to %s", filename); } } --- 202,216 ---- writeall(int fd, const void *buf, size_t len, const char *filename) { ssize_t x; ! ! while (len != 0) { ! x = write(fd, buf, len); ! if (x == -1) ! err(1, "write to %s", filename); ! else { ! len -= x; ! buf += x; ! } } } *************** *** 462,468 **** rounds = 42; ! while ((ch = getopt(argc, argv, "GISVc:em:n:p:s:x:")) != -1) { switch (ch) { #ifndef VERIFYONLY case 'G': --- 468,474 ---- rounds = 42; ! while ((ch = getopt(argc, argv, "GISVc:em:np:s:x:")) != -1) { switch (ch) { #ifndef VERIFYONLY case 'G':