From a3a8ae7212ec643b6c7a461311b91ff2e403c990 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20V=C3=A1zquez=20Blanco?= Date: Sat, 9 Nov 2024 11:42:04 +0100 Subject: [PATCH] Rename cli_classic.h to a more adequate cli_getop.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The header only defines getop related stuff so it seems more intuitive this way. Change-Id: Iaceeabedc26e93147d8122376d88e730aad1e355 Signed-off-by: Antonio Vázquez Blanco Reviewed-on: https://review.coreboot.org/c/flashrom/+/85072 Reviewed-by: Anastasia Klimchuk Tested-by: build bot (Jenkins) --- cli_classic.c | 2 +- cli_getopt.c | 3 ++- include/{cli_classic.h => cli_getopt.h} | 11 ++++++++--- 3 files changed, 11 insertions(+), 5 deletions(-) rename include/{cli_classic.h => cli_getopt.h} (84%) diff --git a/cli_classic.c b/cli_classic.c index 2fe9324b4..8f3701964 100644 --- a/cli_classic.c +++ b/cli_classic.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include "flash.h" #include "flashchips.h" #include "fmap.h" diff --git a/cli_getopt.c b/cli_getopt.c index fc51fcf92..2112b8a13 100644 --- a/cli_getopt.c +++ b/cli_getopt.c @@ -25,12 +25,13 @@ * SOFTWARE. */ +#include + #include #include #include #include #include -#include "cli_classic.h" #include "flash.h" char *optarg; diff --git a/include/cli_classic.h b/include/cli_getopt.h similarity index 84% rename from include/cli_classic.h rename to include/cli_getopt.h index eb1f0fe95..670bd2452 100644 --- a/include/cli_classic.h +++ b/include/cli_getopt.h @@ -12,8 +12,13 @@ * GNU General Public License for more details. */ -#ifndef CLI_CLASSIC_H -#define CLI_CLASSIC_H +#ifndef __CLI_GETOPT_H__ +#define __CLI_GETOPT_H__ + +/** + * This header is responsible for either including a standard getop + * implementation header or to provide a compatible one. + */ #ifdef HAVE_GETOPT_H #include @@ -40,4 +45,4 @@ int getopt_long_only (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind); #endif /* HAVE_GETOPT_H */ -#endif /* CLI_CLASSIC_H */ +#endif /* __CLI_GETOPT_H__ */