[index] [prev] [next] [options] [help]
See the Contact page for how to subscribe and unsubscribe.

eprints_tech messages

Please note: this page shows emails that have been sent to the eprints_tech mailing list. Some of these may be spam emails we have failed to filter.

[EP-tech] patching perl_lib/Filesys/DiskSpace.pm

From: laci AT degas.ceu.hu (Laszlo Csirmaz)
Date: Thu, 25 Jun 2009 15:57:14 +0200 (CEST)


http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** EPrints community wiki - http://wiki.eprints.org/
Hi,

the perl_lib/Filesys/DiskSpace.pm utility is quite old, and cannot
handle 64 bit machines. It manifests when the hard drive is quite
large. The problem is that the perl's idea of Long real and the
returned structure (containing long reals) are different. In line
101, the command `unpack "L7"' should be changed to `unpack 
"L!7"'.
(I didn't check other unpack commands here.)
Also, this patch adds the REISERFS magic number, so df will work
with resiserfs filesystems as well.

Best,

Laszlo

===================================================================
*** eprints/perl_lib/Filesys/DiskSpace.pm.orig  2009-06-24
20:39:01.000000000 +0200
--- eprints/perl_lib/Filesys/DiskSpace.pm       2009-06-24
20:41:49.000000000 +0200
***************
*** 38,43 ****
--- 38,45 ----
               19920821   => "SYSV4_SUPER_MAGIC",       # 
0x012FF7B5
               19920822   => "SYSV2_SUPER_MAGIC",       # 
0x012FF7B6
               19920823   => "COH_SUPER_MAGIC",         # 
0x012FF7B7
+ ##CSL
+                1382369651 => "REISERFS_SUPER_MAGIC",    # 
0x52654973
                 4187351113 => "HPFS_SUPER_MAGIC",        # 
0xF995E849
  );

***************
*** 98,104 ****
      }
      else {
        ($type, $bsize, $blocks, $bfree, $bavail, $files, $ffree) =
!       unpack "L7", $fmt;
      }
      # type:   type of filesystem (see below)
      # bsize:  optimal transfer block size
--- 100,107 ----
      }
      else {
        ($type, $bsize, $blocks, $bfree, $bavail, $files, $ffree) =
! ##CSL
!       unpack "L!7", $fmt;
      }
      # type:   type of filesystem (see below)
      # bsize:  optimal transfer block size

==========================================================================


[index] [prev] [next] [options] [help]