From 80ec1decc49c72efec2a8b87c06245c92c0ab807 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Thu, 11 Feb 2021 18:11:46 +0100 Subject: New upstream version 1.29.90 --- shared/systemd/src/basic/format-util.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'shared/systemd/src/basic/format-util.h') diff --git a/shared/systemd/src/basic/format-util.h b/shared/systemd/src/basic/format-util.h index c47fa76e..b7e18768 100644 --- a/shared/systemd/src/basic/format-util.h +++ b/shared/systemd/src/basic/format-util.h @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: LGPL-2.1+ */ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include @@ -72,11 +72,14 @@ typedef enum { FORMAT_BYTES_TRAILING_B = 1 << 2, } FormatBytesFlag; -#define FORMAT_BYTES_MAX 16 +#define FORMAT_BYTES_MAX 16U + char *format_bytes_full(char *buf, size_t l, uint64_t t, FormatBytesFlag flag); + static inline char *format_bytes(char *buf, size_t l, uint64_t t) { return format_bytes_full(buf, l, t, FORMAT_BYTES_USE_IEC | FORMAT_BYTES_BELOW_POINT | FORMAT_BYTES_TRAILING_B); } + static inline char *format_bytes_cgroup_protection(char *buf, size_t l, uint64_t t) { if (t == CGROUP_LIMIT_MAX) { (void) snprintf(buf, l, "%s", "infinity"); -- cgit 1.3.0-6-gf8a5