There was a thread last October/November "Problems reading AIX 4.3
files".  Inode numbers can use up to 32 bits.  It was fixed then when
using ls.  The problem has come back with perl.

Here is a patch to make perl return a list (high-16-bits low-16-bits)
rather than a single 32-bit-integer.  There is little point trying to
make it conditional on the size of the integer, especially as no code
ever reads that info.

While putting the code together I corrected another bug.  Right
shifting in perl copies the sign bit.  (Actually that is
implementation defined but it's what mine does.)  In my example
0x80000021 >> 16 gives 0xffff8000.  I added another logical and.  The
same change is made to the [amc]time members.   Hey, I've just fixed
my first Y2038 bug :-)

*** tramp.el-1.393      Tue Jun  6 13:58:27 2000
--- tramp.el    Tue Aug  8 08:51:36 2000
***************
*** 936,944 ****
  if (($s[2] & 0120000) == 0120000) { $l = readlink($f); $l = \"\\\"$l\\\"\"; }
  elsif (($s[2] & 040000) == 040000) { $l = \"t\"; }
  else { $l = \"nil\" };
! printf(\"(%s %u %u %u (%u %u) (%u %u) (%u %u) %u %u t %u %u)\\n\",
! $l, $s[3], $s[4], $s[5], $s[8] >> 16, $s[8] & 0xffff, $s[9] >> 16,
! $s[9] & 0xffff, $s[10] >> 16, $s[10] & 0xffff, $s[7], $s[2], $s[1], $s[0]);"
   )
    "Perl script to produce output suitable for use with `file-attributes'
  on the remote file system.")
--- 936,945 ----
  if (($s[2] & 0120000) == 0120000) { $l = readlink($f); $l = \"\\\"$l\\\"\"; }
  elsif (($s[2] & 040000) == 040000) { $l = \"t\"; }
  else { $l = \"nil\" };
! printf(\"(%s %u %u %u (%u %u) (%u %u) (%u %u) %u %u t %u (%u %u))\\n\",
! $l, $s[3], $s[4], $s[5], $s[8] >> 16 & 0xffff, $s[8] & 0xffff,
! $s[9] >> 16 & 0xffff, $s[9] & 0xffff, $s[10] >> 16 & 0xffff, $s[10] & 0xffff,
! $s[7], $s[2], $s[1], $s[0] >> 16 & 0xffff, $s[0] & 0xffff);"
   )
    "Perl script to produce output suitable for use with `file-attributes'
  on the remote file system.")

-- 
Pete Forman                 -./\.- Disclaimer: This post is originated
Western Geophysical           -./\.-  by myself and does not represent
[EMAIL PROTECTED]         -./\.-  the opinion of Baker Hughes or
http://www.crosswinds.net/~petef  -./\.-  its divisions.

Reply via email to