diff --git a/mount/CHANGELOG b/mount/CHANGELOG index 056e766ad..4e8ba0c9a 100644 --- a/mount/CHANGELOG +++ b/mount/CHANGELOG @@ -21,3 +21,4 @@ Mounted filesystems can now be displayed on Intel macs, without needing the gcc SMBFS authentication credentials can be stored in a separate file, thanks to a patch by Rob Shinn. ---- Changes since 1.440 ---- Improved support for filesystems on partitions identified by volume ID when the vol_id command is missing. +Show the used disk space for each filesystem on the main page. diff --git a/mount/index.cgi b/mount/index.cgi index e28c6abcb..c778774d4 100755 --- a/mount/index.cgi +++ b/mount/index.cgi @@ -50,6 +50,7 @@ if (@visible) { print &ui_columns_start([ $text{'index_dir'}, $text{'index_type'}, $text{'index_dev'}, + $text{'index_used'}, $text{'index_use'}, $text{'index_perm'} ], 100); foreach $m (@visible) { @@ -79,6 +80,15 @@ if (@visible) { $fsn .= " ($minfo[2])" if (uc($fsn) ne uc($minfo[2])); push(@cols, $minfo[2] eq "*" ? $text{'index_auto'} : $fsn); push(@cols, &device_name($minfo[1])); + ($total, $free) = &disk_space($minfo[2],$minfo[0]); + if ($total) { + $pc = int(100*($total-$free) / $total); + push(@cols, $pc >= 99 ? "$pc %" : + $pc >= 95 ? "$pc %" : $pc."%"); + } + else { + push(@cols, ""); + } if (&can_edit_fs(@minfo)) { push(@cols, defined($medidx) ? diff --git a/mount/lang/en b/mount/lang/en index dd346d063..d9722a193 100644 --- a/mount/lang/en +++ b/mount/lang/en @@ -2,8 +2,9 @@ index_title=Disk and Network Filesystems index_dir=Mounted as index_type=Type index_dev=Location +index_used=Used index_use=In use? -index_perm=Permanent? +index_perm=Saved? index_add=Add mount index_auto=Unknown Type index_swap=Virtual Memory