Changes in uspace/srv/net/net/start/netstart.c [a000878c:aadf01e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/net/start/netstart.c
ra000878c raadf01e 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(const 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 printf( 79 printf( "%s\n", NAME);78 printf("Task %d - ", task_get_id()); 79 printf("%s\n", NAME); 80 80 // run self tests 81 ERROR_PROPAGATE( 81 ERROR_PROPAGATE(self_test()); 82 82 // start net service 83 if( ! spawn( "/srv/net")){84 fprintf( stderr, "Could not spawn net\n");83 if(! spawn("/srv/net")){ 84 fprintf(stderr, "Could not spawn net\n"); 85 85 return EINVAL; 86 86 } 87 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);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); 91 91 return ERROR_CODE; 92 92 }else{ 93 printf( "OK\n");93 printf("OK\n"); 94 94 } 95 95 … … 97 97 } 98 98 99 task_id_t spawn( const char * fname){100 const char * argv[ 2];101 task_id_t 99 task_id_t spawn(const char * fname){ 100 const char * argv[2]; 101 task_id_t res; 102 102 103 argv[ 0] = fname;104 argv[ 1] = NULL;105 res = task_spawn( fname, argv);103 argv[0] = fname; 104 argv[1] = NULL; 105 res = task_spawn(fname, argv); 106 106 107 107 return res;
Note:
See TracChangeset
for help on using the changeset viewer.