Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/net/start/netstart.c

    ra64c64d re326edc  
    6262 *  @returns Other error codes as defined for the NET_NET_STARTUP message.
    6363 */
    64 int main(int argc, char * argv[]);
     64int             main( int argc, char * argv[] );
    6565
    6666/** Starts the module.
     
    6969 *  @returns Other error codes as defined for the task_spawn() function.
    7070 */
    71 task_id_t spawn(const char * fname);
     71task_id_t       spawn( char * fname );
    7272
    73 int main(int argc, char * argv[]){
     73int main( int argc, char * argv[] ){
    7474        ERROR_DECLARE;
    7575
    76         int net_phone;
     76        int             net_phone;
    7777
    78         // print the module label
    79         printf("Task %d - ", task_get_id());
    80         printf("%s\n", NAME);
    81 
     78        printf( "Task %d - ", task_get_id());
     79        printf( "%s\n", NAME );
    8280        // run self tests
    83         ERROR_PROPAGATE(self_test());
    84 
    85         // start the networking service
    86         if(! spawn("/srv/net")){
    87                 fprintf(stderr, "Could not spawn net\n");
     81        ERROR_PROPAGATE( self_test());
     82        // start net service
     83        if( ! spawn( "/srv/net" )){
     84                fprintf( stderr, "Could not spawn net\n" );
    8885                return EINVAL;
    8986        }
    90 
    91         // start the networking
    92         net_phone = connect_to_service(SERVICE_NETWORKING);
    93         if(ERROR_OCCURRED(ipc_call_sync_0_0(net_phone, NET_NET_STARTUP))){
    94                 printf("ERROR %d\n", ERROR_CODE);
     87        // start net
     88        net_phone = connect_to_service( SERVICE_NETWORKING );
     89        if( ERROR_OCCURRED( ipc_call_sync_0_0( net_phone, NET_NET_STARTUP ))){
     90                printf( "ERROR %d\n", ERROR_CODE );
    9591                return ERROR_CODE;
    9692        }else{
    97                 printf("OK\n");
     93                printf( "OK\n" );
    9894        }
    9995
     
    10197}
    10298
    103 task_id_t spawn(const char * fname){
    104         const char * argv[2];
    105         task_id_t res;
     99task_id_t spawn( char * fname ){
     100        char *  argv[ 2 ];
     101        task_id_t       res;
    106102
    107         argv[0] = fname;
    108         argv[1] = NULL;
    109         res = task_spawn(fname, argv);
     103        argv[ 0 ] = fname;
     104        argv[ 1 ] = NULL;
     105        res = task_spawn( fname, argv );
    110106       
    111107        return res;
Note: See TracChangeset for help on using the changeset viewer.