write.c.p1b.REL=8.1-RELEASE.diff

-rw-r--r--  1 jhs  staff  1685 Oct 28 21:38 write.c.p1b.REL=7.4-RELEASE.diff
lrwxr-xr-x  1 jhs  staff    32 Oct 28 21:42 write.c.p1b.REL=8.0-RELEASE.diff@ -> write.c.p1b.REL=7.4-RELEASE.diff
lrwxr-xr-x  1 jhs  staff    32 Oct 28 21:44 write.c.p1b.REL=8.1-RELEASE.diff@ -> write.c.p1b.REL=8.0-RELEASE.diff
-rw-r--r--  1 jhs  staff  1778 Oct 29 13:00 write.c.p1b.REL=8.2-RELEASE.diff
lrwxr-xr-x  1 jhs  staff    32 Oct 28 21:47 write.c.p1b.REL=8.3-RELEASE.diff.no_customise@ -> write.c.p1b.REL=8.2-RELEASE.diff
lrwxr-xr-x  1 jhs  staff    32 Oct 29 11:09 write.c.p1b.REL=9.0-RELEASE.diff@ -> write.c.p1b.REL=8.2-RELEASE.diff

Applies to 7.4-RELEASE & 8.[012]-RELEASE
8.3-RELEASE/src/usr.bin/tar/ is near empty

He has written new code I should read.

*** 8.0_1_2-RELEASE-generic/src/usr.bin/tar/write.c	Mon Jun 14 04:09:06 2010
--- generic+jhs_error_detect/src/usr.bin/tar/write.c	Sat Jan 29 18:34:55 2011
***************
*** 945,951 ****
  		}
  		progress += bytes_written;
  		bytes_read = read(fd, bsdtar->buff, FILEDATABUFLEN);
! 	}
  	return 0;
  }
  
--- 959,994 ----
  		}
  		progress += bytes_written;
  		bytes_read = read(fd, bsdtar->buff, FILEDATABUFLEN);
! 		if (bytes_read < 0)				// JHS
! 			{					// JHS
! 			perror(NULL) ;				// JHS
! 			fprintf(stderr,"Read error.\n");	// JHS
! 			// fprintf(stderr,"Read error on %s.\n",	// JHS
! 			// Please pass in name as parameter to print. // JHS
! 			//	"" ); 				// JHS
! 			fprintf(stderr,				// JHS
! 			 "Output will contain false trailing nulls.\n"); // JHS
! 			fprintf(stderr,				// JHS
! 				"File: %s, Line %d, Ret %d\n",	// JHS
! 			 __FILE__, __LINE__, (int)bytes_read );	// JHS
! 			return(-1) ;				// JHS
! 			// I've not read code to see if caller 	// JHS
! 			// appropriately detects & deals with -1 // JHS
! 			// But Ive tested it, with		// JHS
! 			// tar cvf junk.tar aa bb,		// JHS
! 			// & if aa has dev errors,		// JHS
! 			// bb does not get archived.		// JHS
! 			}					// JHS
! 	}
! 	if (bytes_read < 0) 					// JHS
! 		{						// JHS
! 		perror(NULL) ;					// JHS
! 		fprintf(stderr,"File: %s, Line %d\n", 		// JHS
! 			__FILE__, __LINE__ ); 			// JHS
! 		return(-1) ;					// JHS
! 		// I've not read code to see if caller 		// JHS
! 		// appropriately detects & deals with -1 	// JHS
! 		}						// JHS
  	return 0;
  }
  
