StatFS implementation

This commit is contained in:
Jonathan Flat committed 2026-09-30 15:30:36 -06:00
1 parent e6796eb47d
commit 671a219316
9 files changed
+2184 -3

No files matched your search

+21 -1
View File
@@ -1,7 +1,7 @@
/*
This source file is part of the Swift System open source project
Copyright (c) 2020 Apple Inc. and the Swift System project authors
Copyright (c) 2020 - 2026 Apple Inc. and the Swift System project authors
Licensed under Apache License v2.0 with Runtime Library Exception
See https://swift.org/LICENSE.txt for license information
@@ -20,5 +20,25 @@
#include <sched.h>
#include <unistd.h>
#include "io_uring.h"
// The `ST_*` mount-flag constants in <sys/statvfs.h> require _GNU_SOURCE.
// Rather than define _GNU_SOURCE module-wide, which clashes with SwiftGlibc,
// expose them through these getters, defined in shims.c under _GNU_SOURCE.
#include <stdint.h>
uint64_t _system_get_ST_RDONLY(void);
uint64_t _system_get_ST_NOSUID(void);
uint64_t _system_get_ST_NODEV(void);
uint64_t _system_get_ST_NOEXEC(void);
uint64_t _system_get_ST_SYNCHRONOUS(void);
uint64_t _system_get_ST_MANDLOCK(void);
uint64_t _system_get_ST_NOATIME(void);
uint64_t _system_get_ST_NODIRATIME(void);
uint64_t _system_get_ST_RELATIME(void);
uint64_t _system_get_ST_NOSYMFOLLOW(void);
#if !defined(__ANDROID__)
uint64_t _system_get_ST_WRITE(void);
uint64_t _system_get_ST_APPEND(void);
uint64_t _system_get_ST_IMMUTABLE(void);
#endif
#endif