IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 14, 2013, 4:15:30 PM (14 years ago)
Author:
Serge CHASTEL
Message:

Bug: Illegal division by zero at line 63

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous/bin/neb-df

    r31413 r34923  
    5353    my $path        = $vol{host};
    5454    if ($names) {
    55         $path = $vol{name};
     55        $path = $vol{name};
    5656    }
    5757
     
    6161    $total_used     += $used;
    6262    my $available   = $total - $used;
    63     my $usedper     = ($used / $total) * 100;
     63    my $usedper     = ($used / ($total+1)) * 100;
    6464    my $mountpoint  = $vol{mountpoint};
    6565
    6666    if ($vol{allocate} == 1) {
    67         $allocated_total += $total;
    68         $allocated_used += $used;
     67        $allocated_total += $total;
     68        $allocated_used += $used;
    6969    }
    7070    # indicated the part of the nebulous volume name that matches up with a
    71     # local volume (mountpoint) 
     71    # local volume (mountpoint)
    7272    #$path =~ s/$mountpoint/[$mountpoint]/;
    7373
     
    9595
    9696my $total_available   = $total_total - $total_used;
    97 my $total_usedper     = ($total_used / $total_total) * 100; 
     97my $total_usedper     = ($total_used / $total_total) * 100;
    9898
    9999# summary
     
    112112
    113113my $allocated_available   = $allocated_total - $allocated_used;
    114 my $allocated_usedper     = ($allocated_used / $allocated_total) * 100; 
     114my $allocated_usedper     = ($allocated_used / $allocated_total) * 100;
    115115
    116116# summary
     
    188188=item * C<NEB_PASS>
    189189
    190 Equivalent to --pass|-p 
     190Equivalent to --pass|-p
    191191
    192192=back
Note: See TracChangeset for help on using the changeset viewer.