dovecot-2.0: doveadm quota get: Print usage also in percentages.
dovecot at dovecot.org
dovecot at dovecot.org
Wed Jun 2 21:24:13 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/49b3a9e170be
changeset: 11465:49b3a9e170be
user: Timo Sirainen <tss at iki.fi>
date: Wed Jun 02 19:24:07 2010 +0100
description:
doveadm quota get: Print usage also in percentages.
diffstat:
src/plugins/quota/doveadm-quota.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diffs (14 lines):
diff -r 1f8251fc8db5 -r 49b3a9e170be src/plugins/quota/doveadm-quota.c
--- a/src/plugins/quota/doveadm-quota.c Wed Jun 02 19:20:54 2010 +0100
+++ b/src/plugins/quota/doveadm-quota.c Wed Jun 02 19:24:07 2010 +0100
@@ -28,6 +28,10 @@
printf("%llu/%llu",
(unsigned long long)value,
(unsigned long long)limit);
+ if (limit != 0) {
+ printf(" (%u%%)",
+ (unsigned int)(value*100/limit));
+ }
} else if (ret == 0) {
printf("%llu/unlimited",
(unsigned long long)value);
More information about the dovecot-cvs
mailing list