diff mbox series

[2/2] util: Drop unused code

Message ID 20231015213206.43542-2-Michael.Glembotzki@iris-sensing.com
State Accepted
Delegated to: Stefano Babic
Headers show
Series [1/2] cpio_utils: Fail on invalid Image IVT length | expand

Commit Message

Michael Glembotzki Oct. 15, 2023, 9:32 p.m. UTC
Signed-off-by: Michael Glembotzki <Michael.Glembotzki@iris-sensing.com>
---
 core/util.c    | 16 ----------------
 include/util.h |  1 -
 2 files changed, 17 deletions(-)

Comments

Stefano Babic Oct. 16, 2023, 9:49 a.m. UTC | #1
On 15.10.23 23:32, Michael Glembotzki wrote:
> Signed-off-by: Michael Glembotzki <Michael.Glembotzki@iris-sensing.com>
> ---
>   core/util.c    | 16 ----------------
>   include/util.h |  1 -
>   2 files changed, 17 deletions(-)
> 
> diff --git a/core/util.c b/core/util.c
> index afe447f..f8223d7 100644
> --- a/core/util.c
> +++ b/core/util.c
> @@ -563,22 +563,6 @@ int set_aes_key(const char *key, const char *ivt)
>   	return 0;
>   }
>   
> -int set_aes_ivt(const char *ivt)
> -{
> -	int ret;
> -
> -	if (!aes_key)
> -		return -EFAULT;
> -
> -	ret = ascii_to_bin(aes_key->ivt, sizeof(aes_key->ivt), ivt);
> -
> -	if (ret) {
> -		return -EINVAL;
> -	}
> -
> -	return 0;
> -}
> -
>   const char *get_fwenv_config(void) {
>   	if (!fwenv_config)
>   #if defined(CONFIG_UBOOT)
> diff --git a/include/util.h b/include/util.h
> index b50b58e..4202caa 100644
> --- a/include/util.h
> +++ b/include/util.h
> @@ -244,7 +244,6 @@ unsigned char *get_aes_key(void);
>   char get_aes_keylen(void);
>   unsigned char *get_aes_ivt(void);
>   int set_aes_key(const char *key, const char *ivt);
> -int set_aes_ivt(const char *ivt);
>   
>   /* Getting global information */
>   int get_install_info(sourcetype *source, char *buf, size_t len);

Thanks !

Reviewed-by: Stefano Babic <stefano.babic@swupdate.org>

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/core/util.c b/core/util.c
index afe447f..f8223d7 100644
--- a/core/util.c
+++ b/core/util.c
@@ -563,22 +563,6 @@  int set_aes_key(const char *key, const char *ivt)
 	return 0;
 }
 
-int set_aes_ivt(const char *ivt)
-{
-	int ret;
-
-	if (!aes_key)
-		return -EFAULT;
-
-	ret = ascii_to_bin(aes_key->ivt, sizeof(aes_key->ivt), ivt);
-
-	if (ret) {
-		return -EINVAL;
-	}
-
-	return 0;
-}
-
 const char *get_fwenv_config(void) {
 	if (!fwenv_config)
 #if defined(CONFIG_UBOOT)
diff --git a/include/util.h b/include/util.h
index b50b58e..4202caa 100644
--- a/include/util.h
+++ b/include/util.h
@@ -244,7 +244,6 @@  unsigned char *get_aes_key(void);
 char get_aes_keylen(void);
 unsigned char *get_aes_ivt(void);
 int set_aes_key(const char *key, const char *ivt);
-int set_aes_ivt(const char *ivt);
 
 /* Getting global information */
 int get_install_info(sourcetype *source, char *buf, size_t len);