public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] mount/mount05.c: Add mode argument to open call.
@ 2013-07-09 16:55 Vinson Lee
  2013-07-10  1:51 ` Wanlong Gao
  0 siblings, 1 reply; 2+ messages in thread
From: Vinson Lee @ 2013-07-09 16:55 UTC (permalink / raw)
  To: ltp-list

From: Vinson Lee <vlee@twitter.com>

This patch fixes this build error on Ubuntu introduced with commit
9146d83d410dc060124344fcbcdbf46280b674a2.

In file included from /usr/include/fcntl.h:279:0,
                 from mount05.c:31:
In function ‘open’,
    inlined from ‘main’ at mount05.c:94:12:
/usr/include/x86_64-linux-gnu/bits/fcntl2.h:50:24: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments

Signed-off-by: Vinson Lee <vlee@twitter.com>
---
 testcases/kernel/syscalls/mount/mount05.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/syscalls/mount/mount05.c b/testcases/kernel/syscalls/mount/mount05.c
index 8a78938..65cc0ab 100644
--- a/testcases/kernel/syscalls/mount/mount05.c
+++ b/testcases/kernel/syscalls/mount/mount05.c
@@ -91,7 +91,7 @@ int main(int argc, char *argv[])
 			tst_resm(TFAIL | TTERRNO, "mount(2) failed");
 		} else {
 
-			if (open(file_des, O_CREAT | O_EXCL) == -1 &&
+			if (open(file_des, O_CREAT | O_EXCL, S_IRWXU) == -1 &&
 			    errno == EEXIST)
 				tst_resm(TPASS, "bind mount is ok");
 			else
-- 
1.8.1.2


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

end of thread, other threads:[~2013-07-10  1:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-09 16:55 [LTP] [PATCH] mount/mount05.c: Add mode argument to open call Vinson Lee
2013-07-10  1:51 ` Wanlong Gao

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