-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add statx #297
Conversation
# check for statx | ||
AC_CHECK_FUNC([statx], [AC_DEFINE([HAVE_STATX_FUN],[1],[HAVE_STATX_FUN])],[],[#include <sys/stat.h>]) | ||
AC_CHECK_TYPE([struct statx],[AC_DEFINE([HAVE_STRUCT_STATX],[1],[HAVE_STRUCT_STATX])],[],[#include <sys/stat.h>]) | ||
AS_IF([test "x$HAVE_STRUCT_STATX" = "x1" && test "x$HAVE_STATX_FUN" = "x1"], [AC_DEFINE([HAVE_STATX],[1],[HAVE_STATX])]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check doesn't work somehow... autoconf fun
symlinkNoFollow = False | ||
} | ||
|
||
data StatxMask = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I omitted STATX_MNT_ID, which is only available since Linux 5.8.
-- | ||
data StatxFlags = | ||
StatxFlags { | ||
emptyPath :: Bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe prefix with statx_
as well?
Seems to somewhat work. |
|
||
newtype ExtendedFileStatus = ExtendedFileStatus (ForeignPtr CStatx) -- ^ The constructor is considered internal and may change. | ||
|
||
fileOwnerX :: ExtendedFileStatus -> UserID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is only a subset of FileStatus
. Need to add the rest.
TODO:
maybe provide StatxMask defaults forSTATX_BASIC_STATS
andSTATX_ALL
FP_CHECK_CONSTS
to check for the constants)FileStatus