[PATCH 0/3] linux-user/syscall.c: consolidate statfs syscalls

Michael Tokarev posted 3 patches 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260109214158.726916-1-mjt@tls.msk.ru
Maintainers: Laurent Vivier <laurent@vivier.eu>
linux-user/syscall.c | 114 +++++++++++++++----------------------------
1 file changed, 39 insertions(+), 75 deletions(-)
[PATCH 0/3] linux-user/syscall.c: consolidate statfs syscalls
Posted by Michael Tokarev 1 month ago
Here's some cleanup for linux-user/syscall.c with an RFC.

It drops common ("global") `struct statfs` from syscall1()
function and eliminates an ugly goto into another case label.

The RFC is for the 3rd patch, which replaces two blocks of
the smae code for statfs & statfs64 (which only differ in the
64 suffix) with a common macro.  This way there's a single
implementation of the code, so we avoid code duplication, but
the usage of the C preprocessor this way makes the code a bit
more ugly.

What do you think about this approach?  Using it, a lot of code
in there can be eliminated.

Michael Tokarev (3):
  linux-user/syscall.c: statfs: f_flags is always present
  linux-user/syscall.c: consolidate statfs calls
  linux-user/syscall.c: consolidate statfs calls further

 linux-user/syscall.c | 114 +++++++++++++++----------------------------
 1 file changed, 39 insertions(+), 75 deletions(-)

-- 
2.47.3