Bug 1113065 - System call statx not usable without hacks
System call statx not usable without hacks
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem
Current
All openSUSE Factory
: P5 - None : Normal (vote)
: ---
Assigned To: E-mail List
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-10-24 09:36 UTC by Dr. Werner Fink
Modified: 2018-10-24 10:10 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Test source statx.c to test out statx(2) as NFS secure replacement of stat(2) (4.24 KB, text/plain)
2018-10-24 09:36 UTC, Dr. Werner Fink
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dr. Werner Fink 2018-10-24 09:36:02 UTC
Created attachment 786980 [details]
Test source statx.c  to test out statx(2) as NFS secure replacement of stat(2)

Accordingly to the manual page statx(2) the following lines should be enought to use statx(2) system call:

       #include <sys/types.h>
       #include <sys/stat.h>
       #include <unistd.h>
       #include <fcntl.h>           /* Definition of AT_* constants */

and as the glibc has no wrapper the line

        #include <sys/syscall.h>

together with

        syscall(SYS_statx, dirfd, pathname, flags, mask, &stx);

should work out of the box ... but leads to the error that `struct statx' as well as the STATX_* macros are defined in <linux/stat.h> ... also the  AT_STATX_* macros are defined in <linux/fcntl.h> and missed in <fcntl.h>
Comment 1 Andreas Schwab 2018-10-24 10:10:22 UTC
Fixed in 2.28.