write.c.p1b.REL=7.4-RELEASE.diff
write.c.p1a.REL=9.0-RELEASE.diff

Applies to 7.4-RELEASE & 8.[012]-RELEASE
8.3-RELEASE/src/usr.bin/tar/ is near empty
9.0-RELEASE is Not near empty
9.1-RELEASE 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
***************
*** 217,222 ****
--- 217,224 ----
  	if (ARCHIVE_OK != archive_write_open_file(a, bsdtar->filename))
  		bsdtar_errc(bsdtar, 1, 0, archive_error_string(a));
  	write_archive(a, bsdtar);
+ 		// JHS write_archive is declared void,
+ 		// JHS is there a static extern ret val to check ?
  }
  
  /*
***************
*** 390,395 ****
--- 394,401 ----
  		bsdtar_errc(bsdtar, 1, 0, archive_error_string(a));
  
  	write_archive(a, bsdtar);
+ 		// JHS write_archive is declared void,
+ 		// JHS is there a static extern ret val to check ?
  
  	close(bsdtar->fd);
  	bsdtar->fd = -1;
***************
*** 926,931 ****
--- 932,945 ----
  	off_t	progress = 0;
  
  	bytes_read = read(fd, bsdtar->buff, FILEDATABUFLEN);
+ 	if (bytes_read < 0) {					// JHS
+ 		perror(NULL) ;					// JHS
+ 		fprintf(stderr,"File: %s, Line %d, Ret %d\n",	// JHS
+ 			__FILE__, __LINE__, (int)bytes_read );	// JHS
+ 		return(-1) ;					// JHS
+ 		// I've not checked to see if caller 		// JHS
+ 		// appropriately detects & deals with -1	// JHS
+ 		}						// JHS
  	while (bytes_read > 0) {
  		siginfo_printinfo(bsdtar, progress);
  
