summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjkar8572 <jkar8572>2004-01-05 09:02:34 +0000
committerjkar8572 <jkar8572>2004-01-05 09:02:34 +0000
commitac836075998abb743c0f53f66d45db2d504f5485 (patch)
treeac3bbbd73f677efe3d1a8f13bbffb5721b0b0602
parent9e86f62b400c4b178751fbe0af85a8d1dc7372b5 (diff)
Fixed bug in quotacheck - counted wrongly size of files >2GB (Posta Zoltan)
-rw-r--r--Changelog1
-rw-r--r--quotacheck.c6
2 files changed, 4 insertions, 3 deletions
diff --git a/Changelog b/Changelog
index 6534a05..9b83e4f 100644
--- a/Changelog
+++ b/Changelog
@@ -3,6 +3,7 @@ Changes in quota-tools form 3.10 to 3.11
* added -q flag to quot(8) to avoid sorting of names (Andre Nathan)
* added #include <paths.h> in quotasys.c to avoid compile problems on some systems (Jan Kara)
* changed detection of filesystem to be able to parse comma separated list (Jan Kara)
+* fixed bug in quotacheck(8) which counted wrongly files larger than 2GB (Posta Zoltan)
Changes in quota-tools from 3.09 to 3.10
* alternative port can be specified to rpc.rquotad by -p option (Jan Kara)
diff --git a/quotacheck.c b/quotacheck.c
index e9fd0a8..fdd80cf 100644
--- a/quotacheck.c
+++ b/quotacheck.c
@@ -8,7 +8,7 @@
* New quota format implementation - Jan Kara <jack@suse.cz> - Sponsored by SuSE CR
*/
-#ident "$Id: quotacheck.c,v 1.34 2003/04/08 13:11:06 jkar8572 Exp $"
+#ident "$Id: quotacheck.c,v 1.35 2004/01/05 09:02:34 jkar8572 Exp $"
#include <dirent.h>
#include <stdio.h>
@@ -412,11 +412,11 @@ static int ext2_direct_scan(char *device)
if (ucheck)
add_to_quota(USRQUOTA, i_num, uid, gid,
inode.i_mode, inode.i_links_count,
- inode.i_blocks << 9, 0);
+ ((loff_t)inode.i_blocks) << 9, 0);
if (gcheck)
add_to_quota(GRPQUOTA, i_num, uid, gid,
inode.i_mode, inode.i_links_count,
- inode.i_blocks << 9, 0);
+ ((loff_t)inode.i_blocks) << 9, 0);
if (S_ISDIR(inode.i_mode))
dirs_done++;
else