From: braam Date: Tue, 31 Aug 1999 23:07:41 +0000 (+0000) Subject: Fixes for Linux 2.3 as well as bug fixes after Ayman's testing. X-Git-Tag: v1_7_100~6191 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=0fcf567c488208e9605cba674bf1c5c1bd4dac8e Fixes for Linux 2.3 as well as bug fixes after Ayman's testing. --- diff --git a/lustre/obdclass/obdcontrol b/lustre/obdclass/obdcontrol index 5e29bb6..539a427 100755 --- a/lustre/obdclass/obdcontrol +++ b/lustre/obdclass/obdcontrol @@ -45,7 +45,7 @@ eval 'sub OBD_IOC_DISCONNECT () { &_IOC(1, ord(\'f\'), 14, 4);}' unless defined(&OBD_IOC_DISCONNECT); eval 'sub OBD_IOC_STATFS () { &_IOC(3, ord(\'f\'), 15, 4);}' unless defined(&OBD_IOC_STATFS); -eval 'sub OBD_IOC_SYNC () { &_IOC(2, ord(\'f\'), 5, 4);}' unless +eval 'sub OBD_IOC_SYNC () { &_IOC(2, ord(\'f\'), 16, 4);}' unless defined(&OBD_IOC_SYNC); eval 'sub ATTR_MODE () {1;}' unless defined(&ATTR_MODE); @@ -612,8 +612,9 @@ sub Statfs { if (!defined $rc) { print STDERR "ioctl failed: $!\n"; } elsif ($rc eq "0 but true") { + # skip both the conn_id and the fs_type in the buffer my ($bsize, $blocks, $bfree, $bavail, $files, $ffree) = - unpack("x4LLLLLL", $packed); + unpack("x4x4LLLLLL", $packed); print("$bsize byte blocks: $blocks, " . ($blocks - $bfree) . " used, " . "$bfree free ($bavail available).\n"); print "$files files, " . ($files - $ffree) . " used, $ffree free.\n";