[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.50 and 1.51

version 1.50, 2012/04/11 09:27:42 version 1.51, 2012/04/11 14:19:35
Line 405 
Line 405 
         int serrno;          int serrno;
         char *p, buf[MAXBSIZE];          char *p, buf[MAXBSIZE];
   
           if (size == 0)
                   return;
   
         /* Rewind file descriptors. */          /* Rewind file descriptors. */
         if (lseek(from_fd, (off_t)0, SEEK_SET) == (off_t)-1)          if (lseek(from_fd, (off_t)0, SEEK_SET) == (off_t)-1)
                 err(EX_OSERR, "lseek: %s", from_name);                  err(EX_OSERR, "lseek: %s", from_name);
Line 416 
Line 419 
          * trash memory on big files.  This is really a minor hack, but it           * trash memory on big files.  This is really a minor hack, but it
          * wins some CPU back.  Sparse files need special treatment.           * wins some CPU back.  Sparse files need special treatment.
          */           */
         if (!size) {          if (!sparse && size <= 8 * 1048576) {
                 /* nothing to do */  
         } else if (!sparse && size <= 8 * 1048576) {  
                 size_t siz;                  size_t siz;
   
                 if ((p = mmap(NULL, (size_t)size, PROT_READ, MAP_PRIVATE,                  if ((p = mmap(NULL, (size_t)size, PROT_READ, MAP_PRIVATE,

Legend:
Removed from v.1.50  
changed lines
  Added in v.1.51