Changeset 38aaf005 in mainline
- Timestamp:
- 2017-03-18T15:36:00Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ad67aa1
- Parents:
- 0b97336
- Location:
- uspace
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/cp/cp.c
r0b97336 r38aaf005 386 386 } 387 387 388 if (-1 == (fd2 = open(dest, O_ CREAT))) {388 if (-1 == (fd2 = open(dest, O_WRONLY | O_CREAT))) { 389 389 printf("Unable to open destination file %s\n", dest); 390 390 close(fd1); -
uspace/app/tester/mm/pager1.c
r0b97336 r38aaf005 48 48 TPRINTF("Creating temporary file...\n"); 49 49 50 fd = open(TEST_FILE, O_ CREAT);50 fd = open(TEST_FILE, O_RDWR | O_CREAT); 51 51 if (fd < 0) 52 52 return NULL; -
uspace/app/tester/vfs/vfs1.c
r0b97336 r38aaf005 76 76 TPRINTF("Created directory %s\n", TEST_DIRECTORY); 77 77 78 int fd0 = open(TEST_FILE, O_ CREAT);78 int fd0 = open(TEST_FILE, O_RDWR | O_CREAT); 79 79 if (fd0 < 0) 80 80 return "open() failed"; -
uspace/lib/c/generic/vfs/vfs.c
r0b97336 r38aaf005 388 388 int open(const char *path, int oflag, ...) 389 389 { 390 // FIXME: Some applications call this incorrectly. 391 if ((oflag & (O_RDONLY|O_WRONLY|O_RDWR)) == 0) { 392 oflag |= O_RDWR; 393 } 394 395 assert((((oflag & O_RDONLY) != 0) + ((oflag & O_WRONLY) != 0) + ((oflag & O_RDWR) != 0)) == 1); 390 if (((oflag & (O_RDONLY | O_WRONLY | O_RDWR)) == 0) || 391 ((oflag & (O_RDONLY | O_WRONLY)) == (O_RDONLY | O_WRONLY)) || 392 ((oflag & (O_RDONLY | O_RDWR)) == (O_RDONLY | O_RDWR)) || 393 ((oflag & (O_WRONLY | O_RDWR)) == (O_WRONLY | O_RDWR))) { 394 errno = EINVAL; 395 return -1; 396 } 396 397 397 398 int fd = vfs_lookup(path, walk_flags(oflag) | WALK_REGULAR);
Note:
See TracChangeset
for help on using the changeset viewer.