Changeset b19e892 in mainline for uspace/srv
- Timestamp:
- 2017-04-02T10:39:13Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9c4cf0d
- Parents:
- 80743a1
- Location:
- uspace/srv
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/devman/driver.c
r80743a1 rb19e892 33 33 #include <dirent.h> 34 34 #include <errno.h> 35 #include <fcntl.h>36 35 #include <io/log.h> 37 36 #include <vfs/vfs.h> -
uspace/srv/devman/match.c
r80743a1 rb19e892 32 32 33 33 #include <errno.h> 34 #include <fcntl.h>35 34 #include <io/log.h> 36 35 #include <str.h> … … 203 202 struct stat st; 204 203 205 fd = open(conf_path, O_RDONLY);204 fd = vfs_lookup_open(conf_path, WALK_REGULAR, MODE_READ); 206 205 if (fd < 0) { 207 206 log_msg(LOG_DEFAULT, LVL_ERROR, "Unable to open `%s' for reading: %s.", -
uspace/srv/hid/input/ctl/kbdev.c
r80743a1 rb19e892 39 39 #include <stdbool.h> 40 40 #include <errno.h> 41 #include <fcntl.h>42 41 #include <io/console.h> 43 42 #include <io/keycode.h> -
uspace/srv/hid/input/port/adb.c
r80743a1 rb19e892 38 38 #include <async.h> 39 39 #include <vfs/vfs.h> 40 #include <fcntl.h>41 40 #include <errno.h> 42 41 #include <loc.h> -
uspace/srv/hid/input/proto/mousedev.c
r80743a1 rb19e892 37 37 38 38 #include <stdio.h> 39 #include <fcntl.h>40 39 #include <vfs/vfs_sess.h> 41 40 #include <malloc.h> -
uspace/srv/loader/main.c
r80743a1 rb19e892 48 48 #include <unistd.h> 49 49 #include <stdbool.h> 50 #include <fcntl.h>51 50 #include <sys/types.h> 52 51 #include <ipc/services.h> -
uspace/srv/vfs/vfs_ipc.c
r80743a1 rb19e892 99 99 { 100 100 int fd = IPC_GET_ARG1(*request); 101 int flags= IPC_GET_ARG2(*request);102 103 int rc = vfs_op_open(fd, flags);101 int mode = IPC_GET_ARG2(*request); 102 103 int rc = vfs_op_open(fd, mode); 104 104 async_answer_0(rid, rc); 105 105 } -
uspace/srv/vfs/vfs_ops.c
r80743a1 rb19e892 49 49 #include <unistd.h> 50 50 #include <ctype.h> 51 #include <fcntl.h>52 51 #include <assert.h> 53 52 #include <vfs/canonify.h> … … 274 273 } 275 274 276 int vfs_op_open(int fd, int flags)277 { 278 if ( flags== 0)275 int vfs_op_open(int fd, int mode) 276 { 277 if (mode == 0) 279 278 return EINVAL; 280 279 … … 283 282 return EBADF; 284 283 285 if (( flags& ~file->permissions) != 0) {284 if ((mode & ~file->permissions) != 0) { 286 285 vfs_file_put(file); 287 286 return EPERM; … … 293 292 } 294 293 295 file->open_read = ( flags& MODE_READ) != 0;296 file->open_write = ( flags& (MODE_WRITE | MODE_APPEND)) != 0;297 file->append = ( flags& MODE_APPEND) != 0;294 file->open_read = (mode & MODE_READ) != 0; 295 file->open_write = (mode & (MODE_WRITE | MODE_APPEND)) != 0; 296 file->append = (mode & MODE_APPEND) != 0; 298 297 299 298 if (!file->open_read && !file->open_write) {
Note:
See TracChangeset
for help on using the changeset viewer.