Add auto-generated code markers
The presence of these markers in the original code was helpful to me in
figuring out that this portion of the code is auto-generated.
Therefore, I think those are useful and should be present.
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
diff --git a/include/mbedtls/error.h b/include/mbedtls/error.h
index 3f0af04..cff22ea 100644
--- a/include/mbedtls/error.h
+++ b/include/mbedtls/error.h
@@ -132,7 +132,7 @@
* representation.
*
* This function returns a const pointer to an un-modifiable string. The caller
- * must not try to modify the string use it only for logging purposes.
+ * must not try to modify the string and use it only for logging purposes.
*
* \param error_code error code
*
diff --git a/library/error.c b/library/error.c
index 200e579..ee1f8b7 100644
--- a/library/error.c
+++ b/library/error.c
@@ -219,6 +219,7 @@
switch( error_code )
{
+ /* Begin Auto-Generated Code. */
#if defined(MBEDTLS_CIPHER_C)
case -(MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE):
error_description = "CIPHER - The selected feature is not available";
@@ -713,6 +714,7 @@
error_description = "X509 - A fatal error occurred, eg the chain is too long or the vrfy callback failed";
break;
#endif /* MBEDTLS_X509_USE_C || MBEDTLS_X509_CREATE_C */
+ /* End Auto-Generated Code. */
default:
break;
@@ -727,6 +729,7 @@
switch( error_code )
{
+ /* Begin Auto-Generated Code. */
#if defined(MBEDTLS_AES_C)
case -(MBEDTLS_ERR_AES_INVALID_KEY_LENGTH):
error_description = "AES - Invalid key length";
@@ -1122,6 +1125,7 @@
error_description = "XTEA - XTEA hardware accelerator failed";
break;
#endif /* MBEDTLS_XTEA_C */
+ /* End Auto-Generated Code. */
default:
break;
diff --git a/scripts/data_files/error.fmt b/scripts/data_files/error.fmt
index 4cf3a9d..5699d9e 100644
--- a/scripts/data_files/error.fmt
+++ b/scripts/data_files/error.fmt
@@ -48,7 +48,9 @@
switch( error_code )
{
+ /* Begin Auto-Generated Code. */
HIGH_LEVEL_CODE_CHECKS
+ /* End Auto-Generated Code. */
default:
break;
@@ -63,7 +65,9 @@
switch( error_code )
{
+ /* Begin Auto-Generated Code. */
LOW_LEVEL_CODE_CHECKS
+ /* End Auto-Generated Code. */
default:
break;