Mercurial > dovecot > original-hg > dovecot-1.2
changeset 7848:a1fd8b29f629 HEAD
HP-UX fs quota: Convert blocks to bytes using filesystem's actual block size
instead of using a hardcoded DEV_BSIZE (should this be done with other OSes
too?)
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 12 Jun 2008 23:49:58 +0300 |
parents | 35877d1131db |
children | 9a00bd31ca99 |
files | src/plugins/quota/quota-fs.c |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/quota/quota-fs.c Thu Jun 12 23:31:51 2008 +0300 +++ b/src/plugins/quota/quota-fs.c Thu Jun 12 23:49:58 2008 +0300 @@ -49,6 +49,7 @@ char *mount_path; char *device_path; char *type; + unsigned int block_size; #ifdef FS_QUOTA_SOLARIS int fd; @@ -154,6 +155,7 @@ mount->device_path = point.device_path; mount->mount_path = point.mount_path; mount->type = point.type; + mount->block_size = point.block_size; return mount; } @@ -513,8 +515,10 @@ } if (bytes) { - *value_r = (uint64_t)dqblk.dqb_curblocks * DEV_BSIZE; - *limit_r = (uint64_t)dqblk.dqb_bsoftlimit * DEV_BSIZE; + *value_r = (uint64_t)dqblk.dqb_curblocks * + root->mount->block_size; + *limit_r = (uint64_t)dqblk.dqb_bsoftlimit * + root->mount->block_size; } else { *value_r = dqblk.dqb_curfiles; *limit_r = dqblk.dqb_fsoftlimit;