open for write MUST have the third parameter: mode
parent
de879c15ee
commit
75b2aaee97
|
|
@ -886,7 +886,7 @@ static int get_block_size_by_write(const char *path, int *block_size)
|
||||||
|
|
||||||
snprintf(tmp_filename, sizeof(tmp_filename),
|
snprintf(tmp_filename, sizeof(tmp_filename),
|
||||||
"%s/.blksize-test.tmp", path);
|
"%s/.blksize-test.tmp", path);
|
||||||
if ((fd=open(tmp_filename, O_WRONLY | O_CREAT | O_DIRECT)) < 0) {
|
if ((fd=open(tmp_filename, O_WRONLY | O_CREAT | O_DIRECT, 0755)) < 0) {
|
||||||
result = errno != 0 ? errno : ENOENT;
|
result = errno != 0 ? errno : ENOENT;
|
||||||
logError("file: "__FILE__", line: %d, "
|
logError("file: "__FILE__", line: %d, "
|
||||||
"open file %s fail, errno: %d, error info: %s",
|
"open file %s fail, errno: %d, error info: %s",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue