Changes in uspace/app/getterm/getterm.c [8d2dd7f2:1d6dd2a] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/getterm/getterm.c
r8d2dd7f2 r1d6dd2a 42 42 #include <loc.h> 43 43 #include <vfs/vfs.h> 44 #include <str.h> 44 45 #include "version.h" 45 46 #include "welcome.h" … … 65 66 *stream = NULL; 66 67 67 int oldfd = vfs_lookup_open(path, WALK_REGULAR, mode); 68 if (oldfd < 0) 68 int oldfd; 69 errno_t rc = vfs_lookup_open(path, WALK_REGULAR, mode, &oldfd); 70 if (rc != EOK) 69 71 return; 70 72 71 73 if (oldfd != fd) { 72 if (vfs_clone(oldfd, fd, false) != fd) 74 int newfd; 75 if (vfs_clone(oldfd, fd, false, &newfd) != EOK) 73 76 return; 74 77 78 assert(newfd == fd); 79 75 80 if (vfs_put(oldfd)) 76 81 return; … … 129 134 /* Wait for the terminal service to be ready */ 130 135 service_id_t service_id; 131 int rc = loc_service_get_id(term, &service_id, IPC_FLAG_BLOCKING);136 errno_t rc = loc_service_get_id(term, &service_id, IPC_FLAG_BLOCKING); 132 137 if (rc != EOK) { 133 138 printf("%s: Error waiting on %s (%s)\n", APP_NAME, term, … … 166 171 task_wait_t twait; 167 172 168 int rc = task_spawnv(&id, &twait, cmd, (const char * const *) args);173 errno_t rc = task_spawnv(&id, &twait, cmd, (const char * const *) args); 169 174 if (rc != EOK) { 170 175 printf("%s: Error spawning %s (%s)\n", APP_NAME, cmd,
Note:
See TracChangeset
for help on using the changeset viewer.