Date: Tue, 13 Jul 2010 14:50:04 GMT From: Garrett Cooper <yanegomi@gmail.com> To: freebsd-sysinstall@FreeBSD.org Subject: Re: bin/97108: sysinstall(8): write failure on transfer (wrote -1 bytes of 1425408 bytes) Message-ID: <201007131450.o6DEo4pA012867@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/97108; it has been noted by GNATS. From: Garrett Cooper <yanegomi@gmail.com> To: bug-followup@FreeBSD.org, juan.fco.rodriguez@gmail.com Cc: Subject: Re: bin/97108: sysinstall(8): write failure on transfer (wrote -1 bytes of 1425408 bytes) Date: Tue, 13 Jul 2010 07:42:16 -0700 It might help if we actually captured the error and displayed it... Thanks, -Garrett Index: dist.c =================================================================== --- dist.c (revision 206173) +++ dist.c (working copy) @@ -40,7 +40,9 @@ #include <sys/time.h> #include <sys/uio.h> #include <ctype.h> +#include <errno.h> #include <signal.h> +#include <string.h> #include <libutil.h> unsigned int Dists; @@ -658,6 +660,7 @@ /* No substitution necessary */ retval = write(fd2, buf, realsize); if (retval != realsize) { + msgDebug("Write failure on transfer: %s", strerror(errno)); fclose(fp); dialog_clear_norefresh(); msgConfirm("Write failure on transfer! (wrote %d bytes of %d bytes)", retval, realsize); @@ -669,6 +672,7 @@ if ((buf[j] != 0x0d) || (j == total - 1) || (buf[j + 1] != 0x0a)) { retval = write(fd2, buf + j, 1); if (retval != 1) { + msgDebug("Write failure on transfer: %s", strerror(errno)); fclose(fp); dialog_clear_norefresh(); msgConfirm("Write failure on transfer! (wrote %d bytes of %d bytes)", j, chunksize);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007131450.o6DEo4pA012867>