Skip Menu |

This queue is for tickets about the Filesys-Df CPAN distribution.

Report information
The Basics
Id: 118220
Status: new
Priority: 0/
Queue: Filesys-Df

People
Owner: Nobody in particular
Requestors: debian.axhn [...] manchmal.in-ulm.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: [Patch] "user_blocks" calculation fails for empty file systems
Date: Sat, 1 Oct 2016 21:18:23 +0200
To: bug-filesys-df [...] rt.cpan.org
From: Christoph Biedl <debian.axhn [...] manchmal.in-ulm.de>
Hello, Filesys::Df 0.92 does not provide a user_blocks record if the file system is completely empty (and there are no reserved blocks either), or in other words: If bfree == bavail. Fix is trivial, see below. Christoph --- /usr/lib/x86_64-linux-gnu/perl5/5.20/Filesys/Df.pm +++ /usr/lib/x86_64-linux-gnu/perl5/5.20/Filesys/Df.pm @@ -73,7 +73,7 @@ #### There is a reserved amount for the su #### or there are disk quotas - if($bfree > $bavail) { + if($bfree >= $bavail) { $user_blocks = $blocks - ($bfree - $bavail); $user_used = $user_blocks - $bavail; if($bavail < 0) {
Download signature.asc
application/pgp-signature 819b

Message body not shown because it is not plain text.