public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Mask out O_LARGEFILE in F_GETFL
@ 2003-09-25  5:25 Andi Kleen
  2003-10-01 13:24 ` Andrea Arcangeli
  0 siblings, 1 reply; 2+ messages in thread
From: Andi Kleen @ 2003-09-25  5:25 UTC (permalink / raw)
  To: marcelo.tosatti; +Cc: linux-fsdevel


This fixes a test in the LSB test suite. 

The kernel sets O_LARGEFILE implicitely on 64bit hosts.
According to POSIX it should not appear on F_GETFL then. Just mask it out
always. 

This will also mask it out for explicitely set O_LARGEFILE, but that seems
to be ok.

Any flames for this please to the POSIX comittee, not to me.

-Andi

diff -X ../../KDIFX -burpN linux-2.4.23-pre5/fs/fcntl.c linux-merge/fs/fcntl.c
--- linux-2.4.23-pre5/fs/fcntl.c	2002-11-30 00:37:11.000000000 +0100
+++ linux-merge/fs/fcntl.c	2002-11-30 05:22:20.000000000 +0100
@@ -270,7 +270,7 @@ static long do_fcntl(unsigned int fd, un
 			set_close_on_exec(fd, arg&1);
 			break;
 		case F_GETFL:
-			err = filp->f_flags;
+			err = filp->f_flags & ~O_LARGEFILE;
 			break;
 		case F_SETFL:
 			lock_kernel();


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-10-01 13:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-25  5:25 [PATCH] Mask out O_LARGEFILE in F_GETFL Andi Kleen
2003-10-01 13:24 ` Andrea Arcangeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox