From: Kefu Chai Date: Sun, 2 May 2021 09:50:36 +0000 (+0800) Subject: doc/_ext: print 0B if option value is 0 X-Git-Tag: v17.1.0~2092^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d1aacf555e5f4dfb8d1fece7ce1431cff7ca49eb;p=ceph.git doc/_ext: print 0B if option value is 0 before this change, the rendered Default is "0Ei" if the default size is 0, would be more readable if it is "0B" or "0". Signed-off-by: Kefu Chai --- diff --git a/doc/_ext/ceph_confval.py b/doc/_ext/ceph_confval.py index 98c5e2ff9493..437678812a6a 100644 --- a/doc/_ext/ceph_confval.py +++ b/doc/_ext/ceph_confval.py @@ -108,6 +108,8 @@ def do_plain_num(value: str, typ: str) -> str: def iec_size(value: int) -> str: + if value == 0: + return '0B' units = dict(Ei=60, Pi=50, Ti=40,