From: Lennart Poettering Date: Sat, 14 Jan 2012 02:07:29 +0000 (+0100) Subject: util: support formatting eta and peta bytes with format_bytes() X-Git-Tag: v39~52 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32895bb39049b7d5c244a2e4201f47077bfa8b12;p=systemd util: support formatting eta and peta bytes with format_bytes() --- diff --git a/src/util.c b/src/util.c index 74505655..b6e490d4 100644 --- a/src/util.c +++ b/src/util.c @@ -3077,6 +3077,8 @@ int parse_bytes(const char *t, off_t *bytes) { { "M", 1024ULL*1024ULL }, { "G", 1024ULL*1024ULL*1024ULL }, { "T", 1024ULL*1024ULL*1024ULL*1024ULL }, + { "P", 1024ULL*1024ULL*1024ULL*1024ULL*1024ULL }, + { "E", 1024ULL*1024ULL*1024ULL*1024ULL*1024ULL*1024ULL }, { "", 1 }, }; @@ -6082,6 +6084,8 @@ char *format_bytes(char *buf, size_t l, off_t t) { const char *suffix; off_t factor; } table[] = { + { "E", 1024ULL*1024ULL*1024ULL*1024ULL*1024ULL*1024ULL }, + { "P", 1024ULL*1024ULL*1024ULL*1024ULL*1024ULL }, { "T", 1024ULL*1024ULL*1024ULL*1024ULL }, { "G", 1024ULL*1024ULL*1024ULL }, { "M", 1024ULL*1024ULL },