[BACK]Return to xinstall.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / xinstall

Diff for /src/usr.bin/xinstall/xinstall.c between version 1.2 and 1.3

version 1.2, 1995/12/21 14:47:09 version 1.3, 1996/06/26 05:44:05
Line 1 
Line 1 
   /*      $OpenBSD$       */
 /*      $NetBSD: xinstall.c,v 1.9 1995/12/20 10:25:17 jonathan Exp $    */  /*      $NetBSD: xinstall.c,v 1.9 1995/12/20 10:25:17 jonathan Exp $    */
   
 /*  /*
Line 43 
Line 44 
 #if 0  #if 0
 static char sccsid[] = "@(#)xinstall.c  8.1 (Berkeley) 7/21/93";  static char sccsid[] = "@(#)xinstall.c  8.1 (Berkeley) 7/21/93";
 #endif  #endif
 static char rcsid[] = "$NetBSD: xinstall.c,v 1.9 1995/12/20 10:25:17 jonathan Exp $";  static char rcsid[] = "$OpenBSD$";
 #endif /* not lint */  #endif /* not lint */
   
 #include <sys/param.h>  #include <sys/param.h>
Line 300 
Line 301 
         register int nr, nw;          register int nr, nw;
         int serrno;          int serrno;
         char *p, buf[MAXBSIZE];          char *p, buf[MAXBSIZE];
           volatile size_t siz;
   
         /*          /*
          * Mmap and write if less than 8M (the limit is so we don't totally           * Mmap and write if less than 8M (the limit is so we don't totally
Line 310 
Line 312 
                 if ((p = mmap(NULL, (size_t)size, PROT_READ,                  if ((p = mmap(NULL, (size_t)size, PROT_READ,
                     0, from_fd, (off_t)0)) == (char *)-1)                      0, from_fd, (off_t)0)) == (char *)-1)
                         err(1, "%s", from_name);                          err(1, "%s", from_name);
                 if (write(to_fd, p, size) != size)                  siz = (size_t)size;
                   if (write(to_fd, p, siz) != siz)
                         err(1, "%s", to_name);                          err(1, "%s", to_name);
         } else {          } else {
                 while ((nr = read(from_fd, buf, sizeof(buf))) > 0)                  while ((nr = read(from_fd, buf, sizeof(buf))) > 0)

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3