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

Diff for /src/usr.bin/less/ch.c between version 1.21 and 1.22

version 1.21, 2019/09/03 23:08:42 version 1.22, 2021/08/07 12:41:51
Line 643 
Line 643 
         ch_block = 0; /* ch_fpos / LBUFSIZE; */          ch_block = 0; /* ch_fpos / LBUFSIZE; */
         ch_offset = 0; /* ch_fpos % LBUFSIZE; */          ch_offset = 0; /* ch_fpos % LBUFSIZE; */
   
 #if 1  
         /*  
          * This is a kludge to workaround a Linux kernel bug: files in  
          * /proc have a size of 0 according to fstat() but have readable  
          * data.  They are sometimes, but not always, seekable.  
          * Force them to be non-seekable here.  
          */  
         if (ch_fsize == 0) {  
                 ch_fsize = -1;  
                 ch_flags &= ~CH_CANSEEK;  
         }  
 #endif  
   
         if (lseek(ch_file, (off_t)0, SEEK_SET) == (off_t)-1) {          if (lseek(ch_file, (off_t)0, SEEK_SET) == (off_t)-1) {
                 /*                  /*
                  * Warning only; even if the seek fails for some reason,                   * Warning only; even if the seek fails for some reason,

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22