Changes in uspace/app/tester/hw/misc/virtchar1.c [6afc9d7:9c4cf0d] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tester/hw/misc/virtchar1.c
r6afc9d7 r9c4cf0d 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.