]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
quota-fs: File count limits with NetBSD shouldn't be multiplied by DEV_BSIZE
authorTimo Sirainen <tss@iki.fi>
Sun, 6 Dec 2015 13:39:53 +0000 (15:39 +0200)
committerTimo Sirainen <tss@iki.fi>
Sun, 6 Dec 2015 13:39:53 +0000 (15:39 +0200)
src/plugins/quota/quota-fs.c

index b9e207a8cb5339eb749829058daebc23a5e659e8..b4abf43c79e750bf91a5b701a96a99d7941c123b 100644 (file)
@@ -697,8 +697,13 @@ fs_quota_get_netbsd(struct fs_quota_root *root, bool group, bool bytes,
                        root->mount->mount_path);
                ret = -1;
        } else {
-               *value_r = qv.qv_usage * DEV_BSIZE;
-               *limit_r = qv.qv_softlimit * DEV_BSIZE;
+               if (bytes) {
+                       *value_r = qv.qv_usage * DEV_BSIZE;
+                       *limit_r = qv.qv_softlimit * DEV_BSIZE;
+               } else {
+                       *value_r = qv.qv_usage;
+                       *limit_r = qv.qv_softlimit;
+               }
                ret = 1;
        }
        quota_close(qh);