Merge "Add mode bits to a call to open with O_CREAT" am: 294f7312dd am: 990c4c611b
am: 88cd8ee286
Change-Id: I7bdb002c2e9d2cc3cad671e9eb326c04af12daa9
This commit is contained in:
commit
67878340ca
1 changed files with 1 additions and 1 deletions
|
|
@ -80,7 +80,7 @@ static int fs_prepare_path_impl(const char* path, mode_t mode, uid_t uid, gid_t
|
||||||
create:
|
create:
|
||||||
create_result = prepare_as_dir
|
create_result = prepare_as_dir
|
||||||
? TEMP_FAILURE_RETRY(mkdir(path, mode))
|
? TEMP_FAILURE_RETRY(mkdir(path, mode))
|
||||||
: TEMP_FAILURE_RETRY(open(path, O_CREAT | O_CLOEXEC | O_NOFOLLOW | O_RDONLY));
|
: TEMP_FAILURE_RETRY(open(path, O_CREAT | O_CLOEXEC | O_NOFOLLOW | O_RDONLY, 0644));
|
||||||
if (create_result == -1) {
|
if (create_result == -1) {
|
||||||
if (errno != EEXIST) {
|
if (errno != EEXIST) {
|
||||||
ALOGE("Failed to %s(%s): %s",
|
ALOGE("Failed to %s(%s): %s",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue