Changes in uspace/srv/net/net/start/netstart.c [a64c64d:e326edc] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/net/start/netstart.c
ra64c64d re326edc 62 62 * @returns Other error codes as defined for the NET_NET_STARTUP message. 63 63 */ 64 int main(int argc, char * argv[]);64 int main( int argc, char * argv[] ); 65 65 66 66 /** Starts the module. … … 69 69 * @returns Other error codes as defined for the task_spawn() function. 70 70 */ 71 task_id_t spawn(const char * fname);71 task_id_t spawn( char * fname ); 72 72 73 int main( int argc, char * argv[]){73 int main( int argc, char * argv[] ){ 74 74 ERROR_DECLARE; 75 75 76 int 76 int net_phone; 77 77 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 ); 82 80 // 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" ); 88 85 return EINVAL; 89 86 } 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 ); 95 91 return ERROR_CODE; 96 92 }else{ 97 printf( "OK\n");93 printf( "OK\n" ); 98 94 } 99 95 … … 101 97 } 102 98 103 task_id_t spawn( const char * fname){104 c onst char * argv[2];105 task_id_t 99 task_id_t spawn( char * fname ){ 100 char * argv[ 2 ]; 101 task_id_t res; 106 102 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 ); 110 106 111 107 return res;
Note:
See TracChangeset
for help on using the changeset viewer.