summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAntonio Nino Diaz <antonio.ninodiaz@arm.com>2018-11-08 10:20:19 +0000
committerAntonio Nino Diaz <antonio.ninodiaz@arm.com>2018-11-08 10:20:19 +0000
commitc3cf06f1a3a9b9ee8ac7a0ae505f95c45f7dca84 (patch)
treea10cbb4dba8a33d5a444ed37486f013f19eab635 /tools
parentf5ae1b0e098277a5b02a823a23f61577e53eadf2 (diff)
Standardise header guards across codebase
All identifiers, regardless of use, that start with two underscores are reserved. This means they can't be used in header guards. The style that this project is now to use the full name of the file in capital letters followed by 'H'. For example, for a file called "uart_example.h", the header guard is UART_EXAMPLE_H. The exceptions are files that are imported from other projects: - CryptoCell driver - dt-bindings folders - zlib headers Change-Id: I50561bf6c88b491ec440d0c8385c74650f3c106e Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/cert_create/include/cert.h6
-rw-r--r--tools/cert_create/include/cmd_opt.h6
-rw-r--r--tools/cert_create/include/debug.h6
-rw-r--r--tools/cert_create/include/ext.h6
-rw-r--r--tools/cert_create/include/key.h6
-rw-r--r--tools/cert_create/include/sha.h6
-rw-r--r--tools/cert_create/include/tbbr/tbb_cert.h6
-rw-r--r--tools/cert_create/include/tbbr/tbb_ext.h6
-rw-r--r--tools/cert_create/include/tbbr/tbb_key.h6
-rw-r--r--tools/fiptool/fiptool.h6
-rw-r--r--tools/fiptool/fiptool_platform.h31
-rw-r--r--tools/fiptool/tbbr_config.h6
-rw-r--r--tools/fiptool/win_posix.h63
13 files changed, 80 insertions, 80 deletions
diff --git a/tools/cert_create/include/cert.h b/tools/cert_create/include/cert.h
index 07bb3379..39b45b58 100644
--- a/tools/cert_create/include/cert.h
+++ b/tools/cert_create/include/cert.h
@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#ifndef CERT_H_
-#define CERT_H_
+#ifndef CERT_H
+#define CERT_H
#include <openssl/ossl_typ.h>
#include <openssl/x509.h>
@@ -65,4 +65,4 @@ int cert_new(
extern cert_t *certs;
extern const unsigned int num_certs;
-#endif /* CERT_H_ */
+#endif /* CERT_H */
diff --git a/tools/cert_create/include/cmd_opt.h b/tools/cert_create/include/cmd_opt.h
index 5095ed16..10df00ea 100644
--- a/tools/cert_create/include/cmd_opt.h
+++ b/tools/cert_create/include/cmd_opt.h
@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#ifndef CMD_OPT_H_
-#define CMD_OPT_H_
+#ifndef CMD_OPT_H
+#define CMD_OPT_H
#include <getopt.h>
@@ -30,4 +30,4 @@ const struct option *cmd_opt_get_array(void);
const char *cmd_opt_get_name(int idx);
const char *cmd_opt_get_help_msg(int idx);
-#endif /* CMD_OPT_H_ */
+#endif /* CMD_OPT_H */
diff --git a/tools/cert_create/include/debug.h b/tools/cert_create/include/debug.h
index 6302b413..ee8f1f51 100644
--- a/tools/cert_create/include/debug.h
+++ b/tools/cert_create/include/debug.h
@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#ifndef __DEBUG_H__
-#define __DEBUG_H__
+#ifndef DEBUG_H
+#define DEBUG_H
#include <stdio.h>
@@ -56,4 +56,4 @@
# define VERBOSE(...)
#endif
-#endif /* __DEBUG_H__ */
+#endif /* DEBUG_H */
diff --git a/tools/cert_create/include/ext.h b/tools/cert_create/include/ext.h
index d432e639..9c0b5c38 100644
--- a/tools/cert_create/include/ext.h
+++ b/tools/cert_create/include/ext.h
@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#ifndef EXT_H_
-#define EXT_H_
+#ifndef EXT_H
+#define EXT_H
#include <openssl/x509v3.h>
#include "key.h"
@@ -82,4 +82,4 @@ X509_EXTENSION *ext_new_key(int nid, int crit, EVP_PKEY *k);
extern ext_t *extensions;
extern const unsigned int num_extensions;
-#endif /* EXT_H_ */
+#endif /* EXT_H */
diff --git a/tools/cert_create/include/key.h b/tools/cert_create/include/key.h
index 1a253cc7..310a77f3 100644
--- a/tools/cert_create/include/key.h
+++ b/tools/cert_create/include/key.h
@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#ifndef KEY_H_
-#define KEY_H_
+#ifndef KEY_H
+#define KEY_H
#include <openssl/ossl_typ.h>
@@ -71,4 +71,4 @@ int key_store(key_t *key);
extern key_t *keys;
extern const unsigned int num_keys;
-#endif /* KEY_H_ */
+#endif /* KEY_H */
diff --git a/tools/cert_create/include/sha.h b/tools/cert_create/include/sha.h
index 4d07a1e7..4c55f375 100644
--- a/tools/cert_create/include/sha.h
+++ b/tools/cert_create/include/sha.h
@@ -4,9 +4,9 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#ifndef SHA_H_
-#define SHA_H_
+#ifndef SHA_H
+#define SHA_H
int sha_file(int md_alg, const char *filename, unsigned char *md);
-#endif /* SHA_H_ */
+#endif /* SHA_H */
diff --git a/tools/cert_create/include/tbbr/tbb_cert.h b/tools/cert_create/include/tbbr/tbb_cert.h
index 716b570f..628ef3a4 100644
--- a/tools/cert_create/include/tbbr/tbb_cert.h
+++ b/tools/cert_create/include/tbbr/tbb_cert.h
@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#ifndef TBB_CERT_H_
-#define TBB_CERT_H_
+#ifndef TBB_CERT_H
+#define TBB_CERT_H
#include "cert.h"
@@ -26,4 +26,4 @@ enum {
FWU_CERT
};
-#endif /* TBB_CERT_H_ */
+#endif /* TBB_CERT_H */
diff --git a/tools/cert_create/include/tbbr/tbb_ext.h b/tools/cert_create/include/tbbr/tbb_ext.h
index 075d5f3b..462aafcf 100644
--- a/tools/cert_create/include/tbbr/tbb_ext.h
+++ b/tools/cert_create/include/tbbr/tbb_ext.h
@@ -3,8 +3,8 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
-#ifndef TBB_EXT_H_
-#define TBB_EXT_H_
+#ifndef TBB_EXT_H
+#define TBB_EXT_H
#include "ext.h"
@@ -35,4 +35,4 @@ enum {
FWU_HASH_EXT
};
-#endif /* TBB_EXT_H_ */
+#endif /* TBB_EXT_H */
diff --git a/tools/cert_create/include/tbbr/tbb_key.h b/tools/cert_create/include/tbbr/tbb_key.h
index df634c6a..47ad1de0 100644
--- a/tools/cert_create/include/tbbr/tbb_key.h
+++ b/tools/cert_create/include/tbbr/tbb_key.h
@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#ifndef TBB_KEY_H_
-#define TBB_KEY_H_
+#ifndef TBB_KEY_H
+#define TBB_KEY_H
#include "key.h"
@@ -22,4 +22,4 @@ enum {
NON_TRUSTED_FW_CONTENT_CERT_KEY
};
-#endif /* TBB_KEY_H_ */
+#endif /* TBB_KEY_H */
diff --git a/tools/fiptool/fiptool.h b/tools/fiptool/fiptool.h
index d8a5d2ca..af3fcbde 100644
--- a/tools/fiptool/fiptool.h
+++ b/tools/fiptool/fiptool.h
@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#ifndef __FIPTOOL_H__
-#define __FIPTOOL_H__
+#ifndef FIPTOOL_H
+#define FIPTOOL_H
#include <stddef.h>
#include <stdint.h>
@@ -51,4 +51,4 @@ typedef struct cmd {
void (*usage)(void);
} cmd_t;
-#endif /* __FIPTOOL_H__ */
+#endif /* FIPTOOL_H */
diff --git a/tools/fiptool/fiptool_platform.h b/tools/fiptool/fiptool_platform.h
index fd0a1204..9bfa298b 100644
--- a/tools/fiptool/fiptool_platform.h
+++ b/tools/fiptool/fiptool_platform.h
@@ -1,30 +1,31 @@
/*
- * Copyright (c) 2016-2017, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
- *
+ */
+/*
* Build platform specific handling.
* This allows for builds on non-Posix platforms
* e.g. Visual Studio on Windows
*/
-#ifndef __FIPTOOL_PLATFORM_H__
-# define __FIPTOOL_PLATFORM_H__
+#ifndef FIPTOOL_PLATFORM_H
+#define FIPTOOL_PLATFORM_H
-# ifndef _MSC_VER
+#ifndef _MSC_VER
- /* Not Visual Studio, so include Posix Headers. */
-# include <getopt.h>
-# include <openssl/sha.h>
-# include <unistd.h>
+/* Not Visual Studio, so include Posix Headers. */
+# include <getopt.h>
+# include <openssl/sha.h>
+# include <unistd.h>
-# define BLD_PLAT_STAT stat
+# define BLD_PLAT_STAT stat
-# else
+#else
- /* Visual Studio. */
-# include "win_posix.h"
+/* Visual Studio. */
+# include "win_posix.h"
-# endif
+#endif
-#endif /* __FIPTOOL_PLATFORM_H__ */
+#endif /* FIPTOOL_PLATFORM_H */
diff --git a/tools/fiptool/tbbr_config.h b/tools/fiptool/tbbr_config.h
index bad757db..2d897776 100644
--- a/tools/fiptool/tbbr_config.h
+++ b/tools/fiptool/tbbr_config.h
@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#ifndef __TBBR_CONFIG_H__
-#define __TBBR_CONFIG_H__
+#ifndef TBBR_CONFIG_H
+#define TBBR_CONFIG_H
#include <stdint.h>
@@ -22,4 +22,4 @@ typedef struct toc_entry {
extern toc_entry_t toc_entries[];
-#endif /* __TBBR_CONFIG_H__ */
+#endif /* TBBR_CONFIG_H */
diff --git a/tools/fiptool/win_posix.h b/tools/fiptool/win_posix.h
index c3fc3995..836ffed3 100644
--- a/tools/fiptool/win_posix.h
+++ b/tools/fiptool/win_posix.h
@@ -1,41 +1,40 @@
/*
- * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
-#ifndef __WINPOSIX_H__
-# define __WINPOSIX_H__
+#ifndef WIN_POSIX_H
+#define WIN_POSIX_H
-# define _CRT_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
-# include <direct.h>
-# include <io.h>
-# include <stdint.h>
-# include <stdlib.h>
-# include <string.h>
-# include <sys/stat.h>
-
-# include "uuid.h"
+#include <direct.h>
+#include <io.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include "uuid.h"
/* Derive or provide Windows equivalents of Posix/GCC/Unix stuff. */
-# ifndef PATH_MAX
-# ifdef MAX_PATH
-# define PATH_MAX MAX_PATH
-# else
-# ifdef _MAX_PATH
-# define MAX_PATH _MAX_PATH
-# define PATH_MAX _MAX_PATH
-# else
-# define PATH_MAX 260
-# endif
-# endif
-# endif
-
-# ifndef _CRT_SECURE_NO_WARNINGS
-# define _CRT_SECURE_NO_WARNINGS 1
-# endif
+#ifndef PATH_MAX
+# ifdef MAX_PATH
+# define PATH_MAX MAX_PATH
+# else
+# ifdef _MAX_PATH
+# define MAX_PATH _MAX_PATH
+# define PATH_MAX _MAX_PATH
+# else
+# define PATH_MAX 260
+# endif
+# endif
+#endif
+
+#ifndef _CRT_SECURE_NO_WARNINGS
+# define _CRT_SECURE_NO_WARNINGS 1
+#endif
/*
* Platform specific names.
@@ -46,13 +45,13 @@
*/
/* fileno cannot be an inline function, because _fileno is a macro. */
-# define fileno(fileptr) _fileno(fileptr)
+#define fileno(fileptr) _fileno(fileptr)
/* _fstat uses the _stat structure, not stat. */
-# define BLD_PLAT_STAT _stat
+#define BLD_PLAT_STAT _stat
/* Define flag values for _access. */
-# define F_OK 0
+#define F_OK 0
/* getopt implementation for Windows: Data. */
@@ -184,4 +183,4 @@ int getopt_long_only(int argc,
const struct option *longopts,
int *indexptr);
-#endif /* __WINPOSIX_H__ */
+#endif /* WIN_POSIX_H */