diff mbox series

efi_runtime: re-enable the resetsystem runtime interface

Message ID 1535081392-26787-1-git-send-email-ivan.hu@canonical.com
State Accepted
Headers show
Series efi_runtime: re-enable the resetsystem runtime interface | expand

Commit Message

Ivan Hu Aug. 24, 2018, 3:29 a.m. UTC
Re-enable the UEFI runtime service ResetSystem interface,
And also fix the gcc build warning,
warning: ‘efi_runtime_reset_system’ defined but not used

Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
---
 efi_runtime/efi_runtime.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Comments

Alex Hung Sept. 5, 2018, 5:55 p.m. UTC | #1
On 2018-08-23 08:29 PM, Ivan Hu wrote:
> Re-enable the UEFI runtime service ResetSystem interface,
> And also fix the gcc build warning,
> warning: ‘efi_runtime_reset_system’ defined but not used
> 
> Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
> ---
>  efi_runtime/efi_runtime.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/efi_runtime/efi_runtime.c b/efi_runtime/efi_runtime.c
> index d79db78..30a139a 100644
> --- a/efi_runtime/efi_runtime.c
> +++ b/efi_runtime/efi_runtime.c
> @@ -561,10 +561,6 @@ static long efi_runtime_get_nexthighmonocount(unsigned long arg)
>  	return 0;
>  }
>  
> -#if 0
> -/*
> - *  Note: efi_runtime_reset_system currently not used
> - */
>  static long efi_runtime_reset_system(unsigned long arg)
>  {
>  	struct efi_resetsystem __user *resetsystem_user;
> @@ -588,7 +584,6 @@ static long efi_runtime_reset_system(unsigned long arg)
>  	kfree(data);
>  	return 0;
>  }
> -#endif
>  
>  #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
>  static long efi_runtime_query_variableinfo(unsigned long arg)
> @@ -724,6 +719,9 @@ static long efi_runtime_ioctl(struct file *file, unsigned int cmd,
>  	case EFI_RUNTIME_GET_NEXTHIGHMONOTONICCOUNT:
>  		return efi_runtime_get_nexthighmonocount(arg);
>  
> +	case EFI_RUNTIME_RESET_SYSTEM:
> +		return efi_runtime_reset_system(arg);
> +
>  #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
>  	case EFI_RUNTIME_QUERY_VARIABLEINFO:
>  		return efi_runtime_query_variableinfo(arg);
> 


Acked-by: Alex Hung <alex.hung@canonical.com>
Colin Ian King Sept. 7, 2018, 8:41 a.m. UTC | #2
On 24/08/18 04:29, Ivan Hu wrote:
> Re-enable the UEFI runtime service ResetSystem interface,
> And also fix the gcc build warning,
> warning: ‘efi_runtime_reset_system’ defined but not used
> 
> Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
> ---
>  efi_runtime/efi_runtime.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/efi_runtime/efi_runtime.c b/efi_runtime/efi_runtime.c
> index d79db78..30a139a 100644
> --- a/efi_runtime/efi_runtime.c
> +++ b/efi_runtime/efi_runtime.c
> @@ -561,10 +561,6 @@ static long efi_runtime_get_nexthighmonocount(unsigned long arg)
>  	return 0;
>  }
>  
> -#if 0
> -/*
> - *  Note: efi_runtime_reset_system currently not used
> - */
>  static long efi_runtime_reset_system(unsigned long arg)
>  {
>  	struct efi_resetsystem __user *resetsystem_user;
> @@ -588,7 +584,6 @@ static long efi_runtime_reset_system(unsigned long arg)
>  	kfree(data);
>  	return 0;
>  }
> -#endif
>  
>  #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
>  static long efi_runtime_query_variableinfo(unsigned long arg)
> @@ -724,6 +719,9 @@ static long efi_runtime_ioctl(struct file *file, unsigned int cmd,
>  	case EFI_RUNTIME_GET_NEXTHIGHMONOTONICCOUNT:
>  		return efi_runtime_get_nexthighmonocount(arg);
>  
> +	case EFI_RUNTIME_RESET_SYSTEM:
> +		return efi_runtime_reset_system(arg);
> +
>  #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
>  	case EFI_RUNTIME_QUERY_VARIABLEINFO:
>  		return efi_runtime_query_variableinfo(arg);
> 
Acked-by: Colin Ian King <colin.king@canonical.com>
diff mbox series

Patch

diff --git a/efi_runtime/efi_runtime.c b/efi_runtime/efi_runtime.c
index d79db78..30a139a 100644
--- a/efi_runtime/efi_runtime.c
+++ b/efi_runtime/efi_runtime.c
@@ -561,10 +561,6 @@  static long efi_runtime_get_nexthighmonocount(unsigned long arg)
 	return 0;
 }
 
-#if 0
-/*
- *  Note: efi_runtime_reset_system currently not used
- */
 static long efi_runtime_reset_system(unsigned long arg)
 {
 	struct efi_resetsystem __user *resetsystem_user;
@@ -588,7 +584,6 @@  static long efi_runtime_reset_system(unsigned long arg)
 	kfree(data);
 	return 0;
 }
-#endif
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
 static long efi_runtime_query_variableinfo(unsigned long arg)
@@ -724,6 +719,9 @@  static long efi_runtime_ioctl(struct file *file, unsigned int cmd,
 	case EFI_RUNTIME_GET_NEXTHIGHMONOTONICCOUNT:
 		return efi_runtime_get_nexthighmonocount(arg);
 
+	case EFI_RUNTIME_RESET_SYSTEM:
+		return efi_runtime_reset_system(arg);
+
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
 	case EFI_RUNTIME_QUERY_VARIABLEINFO:
 		return efi_runtime_query_variableinfo(arg);