3 |
use Test::More; |
use Test::More; |
4 |
require 'syscall.ph'; # for SYS_statfs |
require 'syscall.ph'; # for SYS_statfs |
5 |
plan tests => 7; |
plan tests => 7; |
6 |
my ($statfs_data) = " " x 16; |
my ($statfs_data) = 0x00 x 8 x 16; |
7 |
my ($tmp) = $_point; |
my ($tmp) = $_point; |
8 |
ok(!syscall(&SYS_statfs,$tmp,$statfs_data),"statfs"); |
ok(!syscall(&SYS_statfs,$tmp,$statfs_data),"statfs"); |
9 |
# FIXME: this is soooooo linux-centric. perhaps parse the output of /bin/df? |
# FIXME: this is soooooo linux-centric. perhaps parse the output of /bin/df? |
10 |
my @list = unpack("L!7L2L!7",$statfs_data); |
my @list = unpack("L!7L2L!7",$statfs_data); |
11 |
print join(', ', @list)."\n"; |
diag "statfs: ",join(', ', @list); |
12 |
shift(@list); |
shift(@list); |
13 |
is(shift(@list),4096,"block size"); |
is(shift(@list),4096,"block size"); |
14 |
is(shift(@list),1000000,"blocks"); |
is(shift(@list),1000000,"blocks"); |