[PATCH] linux-user: Add strace support for printing OFD fcntl operations

Mike Gelfand posted 1 patch 3 years, 8 months ago
Test docker-quick@centos7 failed
Test docker-mingw@fedora failed
Test checkpatch failed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200830092242.31506-1-mikedld@mikedld.com
Maintainers: Laurent Vivier <laurent@vivier.eu>
linux-user/strace.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
[PATCH] linux-user: Add strace support for printing OFD fcntl operations
Posted by Mike Gelfand 3 years, 8 months ago
Signed-off-by: Mike Gelfand <mikedld@mikedld.com>
---
 linux-user/strace.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/linux-user/strace.c b/linux-user/strace.c
index 4f77b0cf76..11fea14fba 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -2056,6 +2056,18 @@ print_fcntl(void *cpu_env, const struct syscallname *name,
         print_pointer(arg2, 1);
         break;
 #endif
+    case TARGET_F_OFD_GETLK:
+        qemu_log("F_OFD_GETLK,");
+        print_pointer(arg2, 1);
+        break;
+    case TARGET_F_OFD_SETLK:
+        qemu_log("F_OFD_SETLK,");
+        print_pointer(arg2, 1);
+        break;
+    case TARGET_F_OFD_SETLKW:
+        qemu_log("F_OFD_SETLKW,");
+        print_pointer(arg2, 1);
+        break;
     case TARGET_F_SETLEASE:
         qemu_log("F_SETLEASE,");
         print_raw_param(TARGET_ABI_FMT_ld, arg2, 0);
-- 
2.28.0


Re: [PATCH] linux-user: Add strace support for printing OFD fcntl operations
Posted by Laurent Vivier 3 years, 8 months ago
Le 30/08/2020 à 11:22, Mike Gelfand a écrit :
> Signed-off-by: Mike Gelfand <mikedld@mikedld.com>
> ---
>  linux-user/strace.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/linux-user/strace.c b/linux-user/strace.c
> index 4f77b0cf76..11fea14fba 100644
> --- a/linux-user/strace.c
> +++ b/linux-user/strace.c
> @@ -2056,6 +2056,18 @@ print_fcntl(void *cpu_env, const struct syscallname *name,
>          print_pointer(arg2, 1);
>          break;
>  #endif
> +    case TARGET_F_OFD_GETLK:
> +        qemu_log("F_OFD_GETLK,");
> +        print_pointer(arg2, 1);
> +        break;
> +    case TARGET_F_OFD_SETLK:
> +        qemu_log("F_OFD_SETLK,");
> +        print_pointer(arg2, 1);
> +        break;
> +    case TARGET_F_OFD_SETLKW:
> +        qemu_log("F_OFD_SETLKW,");
> +        print_pointer(arg2, 1);
> +        break;
>      case TARGET_F_SETLEASE:
>          qemu_log("F_SETLEASE,");
>          print_raw_param(TARGET_ABI_FMT_ld, arg2, 0);
> 

Reviewed-by: Laurent Vivier <laurent@vivier.eu>

Re: [PATCH] linux-user: Add strace support for printing OFD fcntl operations
Posted by Laurent Vivier 3 years, 8 months ago
Le 30/08/2020 à 11:22, Mike Gelfand a écrit :
> Signed-off-by: Mike Gelfand <mikedld@mikedld.com>
> ---
>  linux-user/strace.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/linux-user/strace.c b/linux-user/strace.c
> index 4f77b0cf76..11fea14fba 100644
> --- a/linux-user/strace.c
> +++ b/linux-user/strace.c
> @@ -2056,6 +2056,18 @@ print_fcntl(void *cpu_env, const struct syscallname *name,
>          print_pointer(arg2, 1);
>          break;
>  #endif
> +    case TARGET_F_OFD_GETLK:
> +        qemu_log("F_OFD_GETLK,");
> +        print_pointer(arg2, 1);
> +        break;
> +    case TARGET_F_OFD_SETLK:
> +        qemu_log("F_OFD_SETLK,");
> +        print_pointer(arg2, 1);
> +        break;
> +    case TARGET_F_OFD_SETLKW:
> +        qemu_log("F_OFD_SETLKW,");
> +        print_pointer(arg2, 1);
> +        break;
>      case TARGET_F_SETLEASE:
>          qemu_log("F_SETLEASE,");
>          print_raw_param(TARGET_ABI_FMT_ld, arg2, 0);
> 

Applied to my trivial-patches branch.

Thanks,
Laurent