Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 7171760 in mainline for uspace/app/trace/trace.c


Ignore:
Timestamp:
2011-08-18T12:05:00Z (10 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
b33ec43
Parents:
866e627
Message:

Rework the way how open files are passed from parent task to child.

  • Instead of passing fdi_node_t's, pass handles directly using the IPC_M_STATE_CHANGE_AUTHORIZE mechanism.
  • Remove open_node(), fd_node(), fdi_node_t.
  • Replace fopen_node() with fopen_handle().
  • Replace fnode() with fhandle().
  • The child task does not synchronize with VFS yet.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/trace/trace.c

    r866e627 r7171760  
    587587
    588588        /* Send default files */
    589         fdi_node_t *files[4];
    590         fdi_node_t stdin_node;
    591         fdi_node_t stdout_node;
    592         fdi_node_t stderr_node;
    593        
    594         if ((stdin != NULL) && (fnode(stdin, &stdin_node) == EOK))
    595                 files[0] = &stdin_node;
     589        int *files[4];
     590        int fd_stdin;
     591        int fd_stdout;
     592        int fd_stderr;
     593       
     594        if ((stdin != NULL) && (fhandle(stdin, &fd_stdin) == EOK))
     595                files[0] = &fd_stdin;
    596596        else
    597597                files[0] = NULL;
    598598       
    599         if ((stdout != NULL) && (fnode(stdout, &stdout_node) == EOK))
    600                 files[1] = &stdout_node;
     599        if ((stdout != NULL) && (fhandle(stdout, &fd_stdout) == EOK))
     600                files[1] = &fd_stdout;
    601601        else
    602602                files[1] = NULL;
    603603       
    604         if ((stderr != NULL) && (fnode(stderr, &stderr_node) == EOK))
    605                 files[2] = &stderr_node;
     604        if ((stderr != NULL) && (fhandle(stderr, &fd_stderr) == EOK))
     605                files[2] = &fd_stderr;
    606606        else
    607607                files[2] = NULL;
     
    762762        o = oper_new("open", 2, arg_def, V_INT_ERRNO, 0, resp_def);
    763763        proto_add_oper(p, VFS_IN_OPEN, o);
    764         o = oper_new("open_node", 4, arg_def, V_INT_ERRNO, 0, resp_def);
    765         proto_add_oper(p, VFS_IN_OPEN_NODE, o);
    766764        o = oper_new("read", 1, arg_def, V_ERRNO, 1, resp_def);
    767765        proto_add_oper(p, VFS_IN_READ, o);
Note: See TracChangeset for help on using the changeset viewer.