Changeset 99272a3 in mainline
- Timestamp:
- 2009-06-04T10:12:23Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c8b9f88
- Parents:
- 301ff30
- Location:
- uspace
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/generic/io/io.c
r301ff30 r99272a3 145 145 } 146 146 147 FILE *fopen_node( inode_t *node, const char *mode)147 FILE *fopen_node(fdi_node_t *node, const char *mode) 148 148 { 149 149 int flags; … … 354 354 } 355 355 356 void fnode(FILE *stream, inode_t *node)356 void fnode(FILE *stream, fdi_node_t *node) 357 357 { 358 358 if (stream->fd >= 0) { -
uspace/lib/libc/generic/loader.c
r301ff30 r99272a3 206 206 * 207 207 */ 208 int loader_set_files(loader_t *ldr, inode_t *const files[])208 int loader_set_files(loader_t *ldr, fdi_node_t *const files[]) 209 209 { 210 210 /* … … 212 212 * compute size of the buffer needed. 213 213 */ 214 inode_t *const *ap = files;214 fdi_node_t *const *ap = files; 215 215 size_t count = 0; 216 216 while (*ap != NULL) { … … 219 219 } 220 220 221 inode_t *files_buf = (inode_t *) malloc(count * sizeof(inode_t)); 221 fdi_node_t *files_buf; 222 files_buf = (fdi_node_t *) malloc(count * sizeof(fdi_node_t)); 222 223 if (files_buf == NULL) 223 224 return ENOMEM; … … 232 233 aid_t req = async_send_0(ldr->phone_id, LOADER_SET_FILES, &answer); 233 234 ipcarg_t rc = ipc_data_write_start(ldr->phone_id, (void *) files_buf, 234 count * sizeof( inode_t));235 count * sizeof(fdi_node_t)); 235 236 if (rc != EOK) { 236 237 async_wait_for(req, NULL); -
uspace/lib/libc/generic/task.c
r301ff30 r99272a3 101 101 102 102 /* Send default files */ 103 inode_t *files[4];104 inode_t stdin_node;105 inode_t stdout_node;106 inode_t stderr_node;103 fdi_node_t *files[4]; 104 fdi_node_t stdin_node; 105 fdi_node_t stdout_node; 106 fdi_node_t stderr_node; 107 107 108 108 if ((stdin != NULL) && (stdin != &stdin_null)) { -
uspace/lib/libc/generic/vfs/vfs.c
r301ff30 r99272a3 224 224 } 225 225 226 int open_node( inode_t *node, int oflag)226 int open_node(fdi_node_t *node, int oflag) 227 227 { 228 228 futex_down(&vfs_phone_futex); … … 333 333 } 334 334 335 void fd_node(int fildes, inode_t *node)335 void fd_node(int fildes, fdi_node_t *node) 336 336 { 337 337 futex_down(&vfs_phone_futex); -
uspace/lib/libc/include/loader/loader.h
r301ff30 r99272a3 51 51 extern int loader_set_pathname(loader_t *, const char *); 52 52 extern int loader_set_args(loader_t *, char *const[]); 53 extern int loader_set_files(loader_t *, inode_t *const[]);53 extern int loader_set_files(loader_t *, fdi_node_t *const[]); 54 54 extern int loader_load_program(loader_t *); 55 55 extern int loader_run(loader_t *); -
uspace/lib/libc/include/loader/pcb.h
r301ff30 r99272a3 61 61 int filc; 62 62 /** Preset files. */ 63 inode_t **filv;63 fdi_node_t **filv; 64 64 65 65 /* -
uspace/lib/libc/include/vfs/vfs.h
r301ff30 r99272a3 41 41 #include <stdio.h> 42 42 43 /** 44 * This type is a libc version of the VFS triplet. 45 * It uniquelly identifies a file system node within a file system instance. 46 */ 43 47 typedef struct { 44 48 fs_handle_t fs_handle; 45 49 dev_handle_t dev_handle; 46 50 fs_index_t index; 47 } inode_t;51 } fdi_node_t; 48 52 49 53 extern char *absolutize(const char *, size_t *); 50 54 51 55 extern int mount(const char *, const char *, const char *, const char *, 52 unsigned int flags);56 unsigned int); 53 57 54 extern int open_node( inode_t *node, int oflag);58 extern int open_node(fdi_node_t *, int); 55 59 extern int fd_phone(int); 56 extern void fd_node(int, inode_t *);60 extern void fd_node(int, fdi_node_t *); 57 61 58 extern FILE *fopen_node( inode_t *node, const char *);62 extern FILE *fopen_node(fdi_node_t *, const char *); 59 63 extern int fphone(FILE *); 60 extern void fnode(FILE * stream, inode_t *node);64 extern void fnode(FILE *, fdi_node_t *); 61 65 62 66 #endif -
uspace/srv/loader/main.c
r301ff30 r99272a3 82 82 static char **filv = NULL; 83 83 /** Buffer holding all preset files */ 84 static inode_t *fil_buf = NULL;84 static fdi_node_t *fil_buf = NULL; 85 85 86 86 static elf_info_t prog_info; … … 243 243 } 244 244 245 if ((buf_size % sizeof( inode_t)) != 0) {245 if ((buf_size % sizeof(fdi_node_t)) != 0) { 246 246 ipc_answer_0(callid, EINVAL); 247 247 ipc_answer_0(rid, EINVAL); … … 268 268 ipc_data_write_finalize(callid, fil_buf, buf_size); 269 269 270 int count = buf_size / sizeof( inode_t);270 int count = buf_size / sizeof(fdi_node_t); 271 271 272 272 /* Allocate filvv */ 273 filv = malloc((count + 1) * sizeof( inode_t *));273 filv = malloc((count + 1) * sizeof(fdi_node_t *)); 274 274 275 275 if (filv == NULL) {
Note:
See TracChangeset
for help on using the changeset viewer.