bin/97108: sysinstall(8): write failure on transfer (wrote -1 bytes of 1425408 bytes)

Garrett Cooper yanegomi at gmail.com
Tue Jul 13 14:50:05 UTC 2010


The following reply was made to PR bin/97108; it has been noted by GNATS.

From: Garrett Cooper <yanegomi at gmail.com>
To: bug-followup at FreeBSD.org, juan.fco.rodriguez at 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);


More information about the freebsd-sysinstall mailing list