Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / drivers / md / dm-vdo / string-utils.h
blob96eecd38b1c222f2bd1ba1d7a7d64b1669d44ed1
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Copyright 2023 Red Hat
4 */
6 #ifndef VDO_STRING_UTILS_H
7 #define VDO_STRING_UTILS_H
9 #include <linux/kernel.h>
10 #include <linux/string.h>
12 /* Utilities related to string manipulation */
14 static inline const char *vdo_bool_to_string(bool value)
16 return value ? "true" : "false";
19 /* Append a formatted string to the end of a buffer. */
20 char *vdo_append_to_buffer(char *buffer, char *buf_end, const char *fmt, ...)
21 __printf(3, 4);
23 #endif /* VDO_STRING_UTILS_H */