Skip to contentSkip to conversation

mount/mount05.c: Add mode argument to open call.

PATCH Applied Vinson Lee 2 participants 2 messages Jul 9, 2013 – Jul 10, 2013

lore
Share & tools
lore

Vinson Lee

author
#0 lore raw

PATCH 1/1 mount/mount05.c: Add mode argument to open call.

From: Vinson Lee <[email protected]>

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

---
 testcases/kernel/syscalls/mount/mount05.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/syscalls/mount/mount05.c +1 -1
index 8a78938..65cc0ab 100644
@@ -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
Signature · 13 lines
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Applied
#1 lore raw
Quoted 5 lines · Vinson Lee

From: Vinson Lee <[email protected]>

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

Quoted 7 lines

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

Applied, thank you.

Wanlong Gao

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list