Add mode when open(O_CREAT) is used.

When creating a new file using open(..., O_CREAT), it is an error
to fail to specify a creation mode. If a mode is not specified, a
random stack provided value is used as the "mode".

This will become a runtime error in a future version of Android.

Change-Id: I00609f37d2ea68e21b6404d542830386be354202
1 file changed