diff options
author | Jere Leppänen <jere.leppanen@nokia.com> | 2024-02-27 16:29:31 +0200 |
---|---|---|
committer | Matias Elo <matias.elo@nokia.com> | 2024-03-08 11:46:07 +0200 |
commit | dc4ad15aece97bb3ad176d4cb9f472323f04da3e (patch) | |
tree | 1f63b850b5cdb22cd6c8115f230c9d4304878f98 | |
parent | e6d4a519121a98e05d664a113599ddcb02e40f3d (diff) |
linux-gen: string: rename "print" internal module to "string"
Rename the "print" internal module to "string". It contains the
_odp_snprint() function. Other string and printing related internal
functions can be added in this module in the future.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
-rw-r--r-- | platform/linux-generic/Makefile.am | 4 | ||||
-rw-r--r-- | platform/linux-generic/include/odp_print_internal.h | 22 | ||||
-rw-r--r-- | platform/linux-generic/include/odp_string_internal.h | 27 | ||||
-rw-r--r-- | platform/linux-generic/odp_buffer.c | 2 | ||||
-rw-r--r-- | platform/linux-generic/odp_event_validation.c | 2 | ||||
-rw-r--r-- | platform/linux-generic/odp_packet.c | 2 | ||||
-rw-r--r-- | platform/linux-generic/odp_packet_vector.c | 2 | ||||
-rw-r--r-- | platform/linux-generic/odp_schedule_basic.c | 2 | ||||
-rw-r--r-- | platform/linux-generic/odp_string.c (renamed from platform/linux-generic/odp_print.c) | 7 | ||||
-rw-r--r-- | platform/linux-generic/odp_timer.c | 2 |
10 files changed, 36 insertions, 36 deletions
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 11cdb4c64..2b0d436d9 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -156,8 +156,8 @@ noinst_HEADERS = \ include/odp_packet_internal.h \ include/odp_packet_io_internal.h \ include/odp_parse_internal.h \ - include/odp_print_internal.h \ include/odp_socket_common.h \ + include/odp_string_internal.h \ include/odp_packet_io_stats_common.h \ include/odp_packet_io_stats.h \ include/odp_sysfs_stats.h \ @@ -240,7 +240,6 @@ __LIB__libodp_linux_la_SOURCES = \ odp_packet_io.c \ odp_parse.c \ odp_pkt_queue.c \ - odp_print.c \ odp_pool.c \ odp_pool_mem_src_ops.c \ odp_queue_basic.c \ @@ -260,6 +259,7 @@ __LIB__libodp_linux_la_SOURCES = \ odp_sorted_list.c \ odp_stash.c \ odp_std.c \ + odp_string.c \ odp_system_info.c \ odp_pcapng.c \ odp_thread.c \ diff --git a/platform/linux-generic/include/odp_print_internal.h b/platform/linux-generic/include/odp_print_internal.h deleted file mode 100644 index 949a1cc70..000000000 --- a/platform/linux-generic/include/odp_print_internal.h +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (c) 2022, Nokia - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef ODP_PRINT_INTERNAL_H_ -#define ODP_PRINT_INTERNAL_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include <stddef.h> - -int _odp_snprint(char *str, size_t size, const char *format, ...); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/platform/linux-generic/include/odp_string_internal.h b/platform/linux-generic/include/odp_string_internal.h new file mode 100644 index 000000000..6cea1d109 --- /dev/null +++ b/platform/linux-generic/include/odp_string_internal.h @@ -0,0 +1,27 @@ +/* Copyright (c) 2022, Nokia + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef ODP_STRING_INTERNAL_H_ +#define ODP_STRING_INTERNAL_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include <stddef.h> + +/* Helps with snprintf() return value checking + * + * Otherwise like snprintf(), but returns always the number of characters + * printed (without the end mark) or zero on error. Terminates the string + * always with the end mark. */ +int _odp_snprint(char *str, size_t size, const char *format, ...); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/platform/linux-generic/odp_buffer.c b/platform/linux-generic/odp_buffer.c index 82bf61add..b2bcf031e 100644 --- a/platform/linux-generic/odp_buffer.c +++ b/platform/linux-generic/odp_buffer.c @@ -13,7 +13,7 @@ #include <odp_pool_internal.h> #include <odp_buffer_internal.h> #include <odp_debug_internal.h> -#include <odp_print_internal.h> +#include <odp_string_internal.h> #include <string.h> #include <stdio.h> diff --git a/platform/linux-generic/odp_event_validation.c b/platform/linux-generic/odp_event_validation.c index c2d430f1a..32ca776b8 100644 --- a/platform/linux-generic/odp_event_validation.c +++ b/platform/linux-generic/odp_event_validation.c @@ -20,7 +20,7 @@ #include <odp_init_internal.h> #include <odp_libconfig_internal.h> #include <odp_macros_internal.h> -#include <odp_print_internal.h> +#include <odp_string_internal.h> #include <inttypes.h> #include <string.h> diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c index 17a4a9298..2b37caff0 100644 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@ -25,7 +25,7 @@ #include <odp_packet_internal.h> #include <odp_packet_io_internal.h> #include <odp_pool_internal.h> -#include <odp_print_internal.h> +#include <odp_string_internal.h> /* Inlined API functions */ #include <odp/api/plat/byteorder_inlines.h> diff --git a/platform/linux-generic/odp_packet_vector.c b/platform/linux-generic/odp_packet_vector.c index 698445181..fb149603d 100644 --- a/platform/linux-generic/odp_packet_vector.c +++ b/platform/linux-generic/odp_packet_vector.c @@ -14,7 +14,7 @@ #include <odp_debug_internal.h> #include <odp_event_vector_internal.h> #include <odp_pool_internal.h> -#include <odp_print_internal.h> +#include <odp_string_internal.h> #include <inttypes.h> #include <stdint.h> diff --git a/platform/linux-generic/odp_schedule_basic.c b/platform/linux-generic/odp_schedule_basic.c index 379f1f828..df26cb04f 100644 --- a/platform/linux-generic/odp_schedule_basic.c +++ b/platform/linux-generic/odp_schedule_basic.c @@ -40,7 +40,7 @@ #include <odp_global_data.h> #include <odp_event_internal.h> #include <odp_macros_internal.h> -#include <odp_print_internal.h> +#include <odp_string_internal.h> #include <string.h> #include <time.h> diff --git a/platform/linux-generic/odp_print.c b/platform/linux-generic/odp_string.c index 30a06c2f4..8f280a982 100644 --- a/platform/linux-generic/odp_print.c +++ b/platform/linux-generic/odp_string.c @@ -5,15 +5,10 @@ */ #include <odp/api/hints.h> -#include <odp_print_internal.h> +#include <odp_string_internal.h> #include <stdarg.h> #include <stdio.h> -/* Helps with snprintf() return value checking - * - * Otherwise like snprintf(), but returns always the number of characters - * printed (without the end mark) or zero on error. Terminates the string - * always with the end mark. */ ODP_PRINTF_FORMAT(3, 4) int _odp_snprint(char *str, size_t size, const char *format, ...) { diff --git a/platform/linux-generic/odp_timer.c b/platform/linux-generic/odp_timer.c index c8ea31078..0349e66dd 100644 --- a/platform/linux-generic/odp_timer.c +++ b/platform/linux-generic/odp_timer.c @@ -46,7 +46,7 @@ #include <odp_libconfig_internal.h> #include <odp_macros_internal.h> #include <odp_pool_internal.h> -#include <odp_print_internal.h> +#include <odp_string_internal.h> #include <odp_queue_if.h> #include <odp_timer_internal.h> #include <odp_types_internal.h> |