Changeset 24ab58b3 in mainline for uspace/srv/net/netif/lo/lo.c
- Timestamp:
- 2010-04-06T11:41:48Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 14f1db0
- Parents:
- 4dd8529
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/netif/lo/lo.c
r4dd8529 r24ab58b3 64 64 /** Loopback module name. 65 65 */ 66 #define NAME "lo - loopback interface"66 #define NAME "lo" 67 67 68 68 /** Network interface global data. … … 113 113 } 114 114 115 int change_state_message(device_ref device, device_state_t state){ 116 if(device->state != state){ 115 int change_state_message(device_ref device, device_state_t state) 116 { 117 if (device->state != state) { 117 118 device->state = state; 118 printf("State changed to %s\n", (state == NETIF_ACTIVE) ? "ACTIVE" : "STOPPED"); 119 120 printf("%s: State changed to %s\n", NAME, 121 (state == NETIF_ACTIVE) ? "active" : "stopped"); 122 119 123 return state; 120 124 } 125 121 126 return EOK; 122 127 } … … 166 171 ERROR_PROPAGATE(create(device_id, &device)); 167 172 // print the settings 168 printf(" New device created:\n\tid\t= %d\n", device->device_id);173 printf("%s: Device created (id: %d)\n", NAME, device->device_id); 169 174 return EOK; 170 175 } … … 237 242 238 243 /* Process the message */ 239 int res = netif_module_message(callid, &call, &answer, &answer_count); 244 int res = netif_module_message(NAME, callid, &call, &answer, 245 &answer_count); 240 246 241 247 /* End if said to either by the message or the processing result */ … … 261 267 ERROR_DECLARE; 262 268 263 /* Print the module label */264 printf("Task %d - %s\n", task_get_id(), NAME);265 266 269 /* Start the module */ 267 if (ERROR_OCCURRED(netif_module_start(netif_client_connection))) { 268 printf(" - ERROR %i\n", ERROR_CODE); 270 if (ERROR_OCCURRED(netif_module_start(netif_client_connection))) 269 271 return ERROR_CODE; 270 }271 272 272 273 return EOK;
Note:
See TracChangeset
for help on using the changeset viewer.