Changeset 17b2aac in mainline
- Timestamp:
- 2008-08-12T11:09:16Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4bf40f6
- Parents:
- 34a74ab
- Location:
- uspace/lib/libc
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/generic/task.c
r34a74ab r17b2aac 42 42 #include <async.h> 43 43 #include <errno.h> 44 #include <vfs/vfs.h> 44 45 45 46 task_id_t task_get_id(void) … … 131 132 ipcarg_t retval; 132 133 134 char *pa; 135 size_t pa_len; 136 137 pa = absolutize(path, &pa_len); 138 if (!pa) 139 return 0; 140 133 141 /* Spawn a program loader */ 134 142 phone_id = task_spawn_loader(); 135 if (phone_id < 0) return 0; 143 if (phone_id < 0) 144 return 0; 136 145 137 146 /* … … 140 149 */ 141 150 rc = async_req_0_0(phone_id, LOADER_HELLO); 142 if (rc != EOK) return 0; 151 if (rc != EOK) 152 return 0; 143 153 144 154 /* Send program pathname */ 145 155 req = async_send_0(phone_id, LOADER_SET_PATHNAME, &answer); 146 rc = ipc_data_write_start(phone_id, (void *)pa th, strlen(path));156 rc = ipc_data_write_start(phone_id, (void *)pa, pa_len); 147 157 if (rc != EOK) { 148 158 async_wait_for(req, NULL); … … 151 161 152 162 async_wait_for(req, &retval); 153 if (retval != EOK) goto error; 163 if (retval != EOK) 164 goto error; 154 165 155 166 /* Send arguments */ 156 167 rc = loader_set_args(phone_id, argv); 157 if (rc != EOK) goto error; 168 if (rc != EOK) 169 goto error; 158 170 159 171 /* Request loader to start the program */ 160 172 rc = async_req_0_0(phone_id, LOADER_RUN); 161 if (rc != EOK) goto error; 173 if (rc != EOK) 174 goto error; 162 175 163 176 /* Success */ -
uspace/lib/libc/generic/vfs/vfs.c
r34a74ab r17b2aac 60 60 size_t cwd_len = 0; 61 61 62 staticchar *absolutize(const char *path, size_t *retlen)62 char *absolutize(const char *path, size_t *retlen) 63 63 { 64 64 char *ncwd_path; -
uspace/lib/libc/include/vfs/vfs.h
r34a74ab r17b2aac 36 36 #define LIBC_VFS_H_ 37 37 38 #include <sys/types.h> 39 40 extern char *absolutize(const char *, size_t *); 41 38 42 extern int mount(const char *, const char *, const char *); 39 43
Note:
See TracChangeset
for help on using the changeset viewer.