home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / gnu / utils / bug / 2048 < prev    next >
Encoding:
Text File  |  1992-11-11  |  2.1 KB  |  69 lines

  1. Newsgroups: gnu.utils.bug
  2. Path: sparky!uunet!cis.ohio-state.edu!eso.mc.xerox.COM!leisner
  3. From: leisner@eso.mc.xerox.COM ( Marty Leisner)
  4. Subject: Problem with ls (fileutils 3.4)
  5. Message-ID: <9211120156.AA01044@annapurna.wbst147.xerox.com>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Thu, 12 Nov 1992 01:56:36 GMT
  10. Approved: bug-gnu-utils@prep.ai.mit.edu
  11. Lines: 56
  12.  
  13. I'm running on SunOS 4.1.2 on sparcs...
  14.  
  15. Trying to do ls -l on an automounter directory gave wierd results...
  16. The system ls doesn't have these problems...
  17.  
  18. Using ls -l with the distributed ls I get:
  19. ls -l /usr/AnswerBook
  20. lrwxrwxrwx   1 root     wheel          15 Nov 11 20:48 /usr/AnswerBook -> /files4/AnswerB
  21.  
  22. when I should get:
  23. leisner@annapurna$ ./ls -l /usr/AnswerBook
  24. lrwxrwxrwx   1 root     wheel          15 Nov 11 20:46 /usr/AnswerBook -> /files4/AnswerBook
  25.  
  26. Working with the code, I saw a comment in get_link_name():
  27.   /* Some automounters give incorrect st_size for mount points.
  28.      I can't think of a good workaround for it, though.  *
  29.  
  30. This is true but very strange...
  31. The workaround I came up with quickly was:
  32. *** 1.1 1992/11/12 01:22:41
  33. --- ls.c        1992/11/12 01:45:22
  34. ***************
  35. *** 1017,1023 ****
  36.   #ifdef _AIX
  37.     register int bufsiz = PATH_MAX; /* st_size is wrong. */
  38.   #else
  39. !   register int bufsiz = f->stat.st_size;
  40.   #endif
  41.     register int linksize;
  42.   
  43. --- 1017,1025 ----
  44.   #ifdef _AIX
  45.     register int bufsiz = PATH_MAX; /* st_size is wrong. */
  46.   #else
  47. !   register int bufsiz = f->stat.st_size*2; /* these is a kludge trying to work around
  48. !                                           * the automounter problem -- ml
  49. !                                           */
  50.   #endif
  51.     register int linksize;
  52.   
  53.  
  54.  
  55. Essentially, make bufsiz bigger...it works in this case...
  56.  
  57. For symbolic links, it will waste some space...  I can't wait for a rational
  58. OS with source....
  59.  
  60.  
  61. Marty    leisner.henr801c@xerox.com 
  62.       leisner@eso.mc.xerox.com 
  63.           Member of the League for Programming Freedom 
  64.  The Feynman Problem Solving Algorithm:
  65.  1) Write down the problem
  66.  2) Think very hard
  67.  3) Write down the answer     -- Murray Gell-mann
  68.  
  69.