common:environment: fix mode requirement
Issue: Compiling on Ubuntu 8.10 Fails: inlined from 'envfs_save' at scripts/../common/environment.c:135: /usr/include/bits/fcntl2.h:51: error: call to '_open_missing_mod' declared with attribute error: open with O_CREAT in second argument needs 3 arguments Usage: open(filename, O_WRONLY | O_CREAT) Fix: When using open with O_CREAT, it requires mode to be defined. Signed-off-by: Nishanth Menon <nm@ti.com>
This commit is contained in:
parent
41f4253b6c
commit
2af143fcf2
|
@ -132,7 +132,7 @@ int envfs_save(char *filename, char *dirname)
|
|||
super->crc = ENVFS_32(crc32(0, buf + sizeof(struct envfs_super), size));
|
||||
super->sb_crc = ENVFS_32(crc32(0, buf, sizeof(struct envfs_super) - 4));
|
||||
|
||||
envfd = open(filename, O_WRONLY | O_CREAT);
|
||||
envfd = open(filename, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR);
|
||||
if (envfd < 0) {
|
||||
printf("Open %s %s\n", filename, errno_str());
|
||||
ret = envfd;
|
||||
|
|
Loading…
Reference in New Issue