Changeset 368ee04 in mainline for uspace/app/tester/hw/misc/virtchar1.c
- Timestamp:
- 2017-04-05T18:10:39Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 93ad8166
- Parents:
- 39f892a9 (diff), 2166728 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tester/hw/misc/virtchar1.c
r39f892a9 r368ee04 45 45 #include <vfs/vfs.h> 46 46 #include <vfs/vfs_sess.h> 47 #include <sys/stat.h>48 #include <fcntl.h>49 47 #include "../../tester.h" 50 48 … … 56 54 { 57 55 TPRINTF("Opening `%s'...\n", path); 58 int fd = open(path, O_RDONLY);56 int fd = vfs_lookup(path, WALK_REGULAR); 59 57 if (fd < 0) { 60 58 TPRINTF(" ...error: %s\n", str_error(errno)); … … 71 69 async_sess_t *sess = vfs_fd_session(fd, INTERFACE_DDF); 72 70 if (!sess) { 73 close(fd);71 vfs_put(fd); 74 72 TPRINTF(" ...error: %s\n", str_error(errno)); 75 73 return "Failed to get session to device"; … … 92 90 TPRINTF(" Closing session and file descriptor\n"); 93 91 async_hangup(sess); 94 close(fd);92 vfs_put(fd); 95 93 96 94 return NULL;
Note:
See TracChangeset
for help on using the changeset viewer.