#include "input.h"
#include "init.h"
#include "io.h"
-#include "statx.h"
+#include "libfrog/statx.h"
#include "libxfs.h"
#include "libfrog/logging.h"
#include "libfrog/fsgeom.h"
return 0;
}
-static ssize_t
-_statx(
- int dfd,
- const char *filename,
- unsigned int flags,
- unsigned int mask,
- struct statx *buffer)
-{
-#ifdef __NR_statx
- return syscall(__NR_statx, dfd, filename, flags, mask, buffer);
-#else
- errno = ENOSYS;
- return -1;
-#endif
-}
-
struct statx_masks {
const char *name;
unsigned int mask;
return command_usage(&statx_cmd);
memset(&stx, 0xbf, sizeof(stx));
- if (_statx(file->fd, "", atflag | AT_EMPTY_PATH, mask, &stx) < 0) {
+ if (statx(file->fd, "", atflag | AT_EMPTY_PATH, mask, &stx) < 0) {
perror("statx");
exitcode = 1;
return 0;
__u64 __spare3[9]; /* Spare space for future expansion */
/* 0x100 */
};
+
+static inline ssize_t
+statx(
+ int dfd,
+ const char *filename,
+ unsigned int flags,
+ unsigned int mask,
+ struct statx *buffer)
+{
+#ifdef __NR_statx
+ return syscall(__NR_statx, dfd, filename, flags, mask, buffer);
+#else
+ errno = ENOSYS;
+ return -1;
#endif
+}
+
+#endif /* OVERRIDE_SYSTEM_STATX */
#ifndef STATX_TYPE
/*