🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Marty Leisner Thu, 12 Nov 1992 01:56
Problem with ls (fileutils 3.4)
#1089
Author: Marty Leisner
Date: Thu, 12 Nov 1992 01:56
55 lines
2229 bytes
I'm running on SunOS 4.1.2 on sparcs...

Trying to do ls -l on an automounter directory gave wierd results...
The system ls doesn't have these problems...

Using ls -l with the distributed ls I get:
ls -l /usr/AnswerBook
lrwxrwxrwx   1 root     wheel          15 Nov 11 20:48 /usr/AnswerBook -> /files4/AnswerB

when I should get:
leisner@annapurna$ ./ls -l /usr/AnswerBook
lrwxrwxrwx   1 root     wheel          15 Nov 11 20:46 /usr/AnswerBook -> /files4/AnswerBook

Working with the code, I saw a comment in get_link_name():
  /* Some automounters give incorrect st_size for mount points.
     I can't think of a good workaround for it, though.  *

This is true but very strange...
The workaround I came up with quickly was:
*** 1.1 1992/11/12 01:22:41
--- ls.c        1992/11/12 01:45:22
***************
*** 1017,1023 ****
  #ifdef _AIX
    register int bufsiz = PATH_MAX; /* st_size is wrong. */
  #else
!   register int bufsiz = f->stat.st_size;
  #endif
    register int linksize;
  
--- 1017,1025 ----
  #ifdef _AIX
    register int bufsiz = PATH_MAX; /* st_size is wrong. */
  #else
!   register int bufsiz = f->stat.st_size*2; /* these is a kludge trying to work around
!                                           * the automounter problem -- ml
!                                           */
  #endif
    register int linksize;
  


Essentially, make bufsiz bigger...it works in this case...

For symbolic links, it will waste some space...  I can't wait for a rational
OS with source....


Marty    leisner.henr801c@xerox.com 
 	 leisner@eso.mc.xerox.com 
          Member of the League for Programming Freedom 
 The Feynman Problem Solving Algorithm:
 1) Write down the problem
 2) Think very hard
 3) Write down the answer     -- Murray Gell-mann
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads