Changeset 06b0211b in mainline for uspace/app
- Timestamp:
- 2013-04-29T11:29:45Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- aa2b32c
- Parents:
- ba4799a (diff), df956b9b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- uspace/app
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/ls/ls.c
rba4799a r06b0211b 315 315 { 316 316 if (stat(path, &de->s)) { 317 cli_error(CL_ENOENT, path);317 cli_error(CL_ENOENT, "%s", path); 318 318 return LS_BOGUS; 319 319 } -
uspace/app/bdsh/cmds/modules/sleep/sleep.c
rba4799a r06b0211b 114 114 int ret; 115 115 unsigned int argc; 116 useconds_t duration ;116 useconds_t duration = 0; 117 117 118 118 /* Count the arguments */ -
uspace/app/bnchmark/bnchmark.c
rba4799a r06b0211b 142 142 { 143 143 int rc; 144 umseconds_t milliseconds_taken ;144 umseconds_t milliseconds_taken = 0; 145 145 char *path = NULL; 146 146 measure_func_t fn = NULL; -
uspace/app/init/init.c
rba4799a r06b0211b 369 369 #ifdef CONFIG_START_BD 370 370 srv_start("/srv/ata_bd"); 371 srv_start("/srv/gxe_bd");372 371 #endif 373 372 -
uspace/app/netecho/netecho.c
rba4799a r06b0211b 243 243 if (verbose) 244 244 printf("accept()\n"); 245 245 socket_id = accept(listening_id, (void *) address_buf, &addrlen); 246 246 if (socket_id <= 0) { 247 247 socket_print_error(stderr, socket_id, "Socket accept: ", "\n"); … … 312 312 rc = sendto(socket_id, reply ? reply : data, reply ? reply_length : length, 0, address, addrlen); 313 313 if (rc != EOK) 314 socket_print_error(stderr, rc, "Socket send : ", "\n");314 socket_print_error(stderr, rc, "Socket sendto: ", "\n"); 315 315 } 316 316 } … … 394 394 return listening_id; 395 395 } 396 396 397 /* Bind the listening socket */ 398 rc = bind(listening_id, address, addrlen); 399 if (rc != EOK) { 400 socket_print_error(stderr, rc, "Socket bind: ", "\n"); 401 return rc; 402 } 403 397 404 /* if the stream socket is used */ 398 405 if (type == SOCK_STREAM) { … … 402 409 backlog = 3; 403 410 } 404 411 405 412 /* Set the backlog */ 406 413 rc = listen(listening_id, backlog); … … 409 416 return rc; 410 417 } 411 }412 413 /* Bind the listening socket */414 rc = bind(listening_id, address, addrlen);415 if (rc != EOK) {416 socket_print_error(stderr, rc, "Socket bind: ", "\n");417 return rc;418 418 } 419 419 -
uspace/app/nettest3/nettest3.c
rba4799a r06b0211b 63 63 port = 7; 64 64 65 data = (char *) "Hello World!";65 data = (char *) "Hello World!"; 66 66 size = str_size(data); 67 67 … … 98 98 99 99 printf("connect()\n"); 100 rc = connect(fd, (struct sockaddr *) &addr, sizeof(addr));100 rc = connect(fd, (struct sockaddr *) &addr, sizeof(addr)); 101 101 printf(" -> %d\n", rc); 102 102 if (rc != 0) … … 115 115 } while (rc > 0); 116 116 117 async_usleep(1000 *1000);117 async_usleep(1000 * 1000); 118 118 119 119 printf("closesocket()\n"); … … 124 124 } 125 125 126 127 126 /** @} 128 127 */ -
uspace/app/trace/ipc_desc.c
rba4799a r06b0211b 49 49 { IPC_M_DATA_READ, "DATA_READ" }, 50 50 { IPC_M_DEBUG, "DEBUG" }, 51 52 /* Terminating entry */53 { 0, NULL }54 51 }; 52 53 size_t ipc_methods_len = sizeof(ipc_methods) / sizeof(ipc_m_desc_t); 55 54 56 55 /** @} -
uspace/app/trace/ipc_desc.h
rba4799a r06b0211b 42 42 43 43 extern ipc_m_desc_t ipc_methods[]; 44 extern size_t ipc_methods_len; 44 45 45 46 #endif -
uspace/app/trace/ipcp.c
rba4799a r06b0211b 140 140 void ipcp_init(void) 141 141 { 142 ipc_m_desc_t *desc;143 oper_t *oper;144 145 142 val_type_t arg_def[OPER_MAX_ARGS] = { 146 143 V_INTEGER, … … 162 159 proto_system = proto_new("system"); 163 160 164 desc = ipc_methods; 165 while (desc->number != 0) { 166 oper = oper_new(desc->name, OPER_MAX_ARGS, arg_def, V_INTEGER, 167 OPER_MAX_ARGS, arg_def); 168 proto_add_oper(proto_system, desc->number, oper); 169 170 ++desc; 161 for (size_t i = 0; i < ipc_methods_len; i++) { 162 oper_t *oper = oper_new(ipc_methods[i].name, OPER_MAX_ARGS, 163 arg_def, V_INTEGER, OPER_MAX_ARGS, arg_def); 164 proto_add_oper(proto_system, ipc_methods[i].number, oper); 171 165 } 172 166 -
uspace/app/trace/syscalls.c
rba4799a r06b0211b 46 46 47 47 [SYS_TASK_GET_ID] = { "task_get_id", 1, V_ERRNO }, 48 [SYS_TASK_SET_NAME] = { "task_set_name", 2, V_ERRNO }, 48 49 [SYS_FUTEX_SLEEP] = { "futex_sleep_timeout", 3, V_ERRNO }, 49 50 [SYS_FUTEX_WAKEUP] = { "futex_wakeup", 1, V_ERRNO }, … … 82 83 }; 83 84 85 const size_t syscall_desc_len = (sizeof(syscall_desc) / sizeof(sc_desc_t)); 86 84 87 /** @} 85 88 */ -
uspace/app/trace/syscalls.h
rba4799a r06b0211b 36 36 #define SYSCALLS_H_ 37 37 38 #include <stdbool.h> 39 #include <unistd.h> 40 38 41 #include "trace.h" 39 42 … … 45 48 46 49 extern const sc_desc_t syscall_desc[]; 50 extern const size_t syscall_desc_len; 51 52 static inline bool syscall_desc_defined(unsigned sc_id) 53 { 54 return (sc_id < syscall_desc_len && syscall_desc[sc_id].name != NULL); 55 } 47 56 48 57 #endif -
uspace/app/trace/trace.c
rba4799a r06b0211b 136 136 } 137 137 138 free(task_ldr);139 138 task_ldr = NULL; 140 139 … … 348 347 if ((display_mask & DM_SYSCALL) != 0) { 349 348 /* Print syscall name and arguments */ 350 printf("%s", syscall_desc[sc_id].name); 351 print_sc_args(sc_args, syscall_desc[sc_id].n_args); 349 if (syscall_desc_defined(sc_id)) { 350 printf("%s", syscall_desc[sc_id].name); 351 print_sc_args(sc_args, syscall_desc[sc_id].n_args); 352 } 353 else { 354 printf("unknown_syscall<%d>", sc_id); 355 print_sc_args(sc_args, 6); 356 } 352 357 } 353 358 } … … 372 377 if ((display_mask & DM_SYSCALL) != 0) { 373 378 /* Print syscall return value */ 374 rv_type = syscall_desc[sc_id].rv_type; 379 if (syscall_desc_defined(sc_id)) 380 rv_type = syscall_desc[sc_id].rv_type; 381 else 382 rv_type = V_PTR; 375 383 print_sc_retval(sc_rc, rv_type); 376 384 } … … 497 505 ldr = loader_connect(); 498 506 if (ldr == NULL) 499 return 0;507 return NULL; 500 508 501 509 /* Get task ID. */
Note:
See TracChangeset
for help on using the changeset viewer.