mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 02:17:36 -04:00
tools/nolibc: open files with O_LARGEFILE
nolibc can natively handle large files. Tell this to the kernel by always using O_LARGEFILE when opening files. This is also how other libcs do it. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://patch.msgid.link/20260418-nolibc-largefile-v1-6-b91f0775bac3@weissschuh.net
This commit is contained in:
@@ -29,6 +29,8 @@ int openat(int dirfd, const char *path, int flags, ...)
|
||||
{
|
||||
mode_t mode = 0;
|
||||
|
||||
flags |= O_LARGEFILE;
|
||||
|
||||
if (flags & O_CREAT) {
|
||||
va_list args;
|
||||
|
||||
@@ -55,6 +57,8 @@ int open(const char *path, int flags, ...)
|
||||
{
|
||||
mode_t mode = 0;
|
||||
|
||||
flags |= O_LARGEFILE;
|
||||
|
||||
if (flags & O_CREAT) {
|
||||
va_list args;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user