Changeset 3aae4e8 in mainline for uspace/app
- Timestamp:
- 2010-04-04T22:07:05Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 23de644
- Parents:
- 9f10660f (diff), 73060801 (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:
-
- 14 added
- 5 edited
- 14 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/Makefile
r9f10660f r3aae4e8 29 29 30 30 USPACE_PREFIX = ../.. 31 LIBS = $(LIB _PREFIX)/block/libblock.a $(LIB_PREFIX)/clui/libclui.a32 EXTRA_CFLAGS = -I$(LIB _PREFIX)/block -I$(LIB_PREFIX)/clui-I. -Icmds/ \33 31 LIBS = $(LIBBLOCK_PREFIX)/libblock.a $(LIBCLUI_PREFIX)/libclui.a 32 EXTRA_CFLAGS = -I$(LIBBLOCK_PREFIX) -I$(LIBCLUI_PREFIX) -I. -Icmds/ \ 33 -Icmds/builtins -Icmds/modules 34 34 BINARY = bdsh 35 35 -
uspace/app/bdsh/input.c
r9f10660f r3aae4e8 50 50 #include "errors.h" 51 51 #include "exec.h" 52 53 extern volatile unsigned int cli_quit; 52 54 53 55 /** Text input field. */ … … 107 109 { 108 110 char *str; 111 int rc; 109 112 110 113 fflush(stdout); … … 114 117 console_set_style(fphone(stdout), STYLE_NORMAL); 115 118 116 str = tinput_read(tinput); 119 rc = tinput_read(tinput, &str); 120 if (rc == ENOENT) { 121 /* User requested exit */ 122 cli_quit = 1; 123 putchar('\n'); 124 return; 125 } 126 127 if (rc != EOK) { 128 /* Error in communication with console */ 129 return; 130 } 117 131 118 132 /* Check for empty input. */ -
uspace/app/bdsh/scli.c
r9f10660f r3aae4e8 100 100 } 101 101 } 102 goto finit;103 102 104 finit: 103 printf("Leaving %s.\n", progname); 104 105 105 cli_finit(&usr); 106 106 return ret; -
uspace/app/netecho/Makefile
r9f10660f r3aae4e8 28 28 # 29 29 30 NET_BASE = .. 31 USPACE_PREFIX = ../../.. 32 LIBRARY = libsocket 30 USPACE_PREFIX = ../.. 31 LIBS = $(LIBSOCKET_PREFIX)/libsocket.a 32 EXTRA_CFLAGS = -I$(LIBSOCKET_PREFIX)/include 33 BINARY = netecho 33 34 34 35 SOURCES = \ 35 socket_client.c \ 36 $(NET_BASE)/inet.c \ 37 $(NET_BASE)/modules.c \ 38 $(NET_BASE)/structures/dynamic_fifo.c 36 netecho.c \ 37 parse.c \ 38 print_error.c 39 39 40 40 include $(USPACE_PREFIX)/Makefile.common -
uspace/app/netecho/netecho.c
r9f10660f r3aae4e8 27 27 */ 28 28 29 /** @addtogroup echo29 /** @addtogroup netecho 30 30 * @{ 31 31 */ 32 32 33 33 /** @file 34 * Echo application.34 * Network echo application. 35 35 * Answers received packets. 36 36 */ … … 41 41 #include <task.h> 42 42 43 #include "../../include/in.h" 44 #include "../../include/in6.h" 45 #include "../../include/inet.h" 46 #include "../../include/socket.h" 47 48 #include "../../err.h" 49 50 #include "../parse.h" 51 #include "../print_error.h" 52 53 /** Echo module name. 54 */ 55 #define NAME "Echo" 43 #include <in.h> 44 #include <in6.h> 45 #include <inet.h> 46 #include <socket.h> 47 #include <net_err.h> 48 49 #include "parse.h" 50 #include "print_error.h" 51 52 /** Network echo module name. 53 */ 54 #define NAME "Network Echo" 56 55 57 56 /** Prints the application help. -
uspace/app/netecho/parse.c
r9f10660f r3aae4e8 38 38 #include <str.h> 39 39 40 #include "../include/socket.h" 41 42 #include "../err.h" 40 #include <socket.h> 41 #include <net_err.h> 43 42 44 43 #include "parse.h" -
uspace/app/netecho/parse.h
r9f10660f r3aae4e8 38 38 #define __NET_APP_PARSE__ 39 39 40 #include "../include/socket.h"40 #include <socket.h> 41 41 42 42 /** Translates the character string to the address family number. … … 45 45 * @returns EAFNOSUPPORTED if the address family is not supported. 46 46 */ 47 int parse_address_family(const char * name);47 extern int parse_address_family(const char * name); 48 48 49 49 /** Parses the next parameter as an integral number. … … 60 60 * @returns EINVAL if the parameter is in wrong format. 61 61 */ 62 int parse_parameter_int(int argc, char ** argv, int * index, int * value, const char * name, int offset);62 extern int parse_parameter_int(int argc, char ** argv, int * index, int * value, const char * name, int offset); 63 63 64 64 /** Parses the next named parameter as an integral number. … … 78 78 * @returns ENOENT if the parameter name has not been found. 79 79 */ 80 int parse_parameter_name_int(int argc, char ** argv, int * index, int * value, const char * name, int offset, int (*parse_value)(const char * value));80 extern int parse_parameter_name_int(int argc, char ** argv, int * index, int * value, const char * name, int offset, int (*parse_value)(const char * value)); 81 81 82 82 /** Parses the next parameter as a character string. … … 93 93 * @returns EINVAL if the parameter is missing. 94 94 */ 95 int parse_parameter_string(int argc, char ** argv, int * index, char ** value, const char * name, int offset);95 extern int parse_parameter_string(int argc, char ** argv, int * index, char ** value, const char * name, int offset); 96 96 97 97 /** Translates the character string to the protocol family number. … … 100 100 * @returns EPFNOSUPPORTED if the protocol family is not supported. 101 101 */ 102 int parse_protocol_family(const char * name);102 extern int parse_protocol_family(const char * name); 103 103 104 104 /** Translates the character string to the socket type number. … … 107 107 * @returns ESOCKNOSUPPORTED if the socket type is not supported. 108 108 */ 109 int parse_socket_type(const char * name);109 extern int parse_socket_type(const char * name); 110 110 111 111 /** Prints the parameter unrecognized message and the application help. … … 113 113 * @param[in] parameter The parameter name. 114 114 */ 115 void print_unrecognized(int index, const char * parameter);115 extern void print_unrecognized(int index, const char * parameter); 116 116 117 117 #endif -
uspace/app/netecho/print_error.c
r9f10660f r3aae4e8 37 37 #include <stdio.h> 38 38 39 #include "../include/icmp_codes.h"40 #include "../include/socket_errno.h"39 #include <icmp_codes.h> 40 #include <socket_errno.h> 41 41 42 42 #include "print_error.h" -
uspace/app/netecho/print_error.h
r9f10660f r3aae4e8 56 56 * @param[in] suffix The error description suffix. May be NULL. 57 57 */ 58 void icmp_print_error(FILE * output, int error_code, const char * prefix, const char * suffix);58 extern void icmp_print_error(FILE * output, int error_code, const char * prefix, const char * suffix); 59 59 60 60 /** Prints the error description. … … 65 65 * @param[in] suffix The error description suffix. May be NULL. 66 66 */ 67 void print_error(FILE * output, int error_code, const char * prefix, const char * suffix);67 extern void print_error(FILE * output, int error_code, const char * prefix, const char * suffix); 68 68 69 69 /** Prints the specific socket error description. … … 73 73 * @param[in] suffix The error description suffix. May be NULL. 74 74 */ 75 void socket_print_error(FILE * output, int error_code, const char * prefix, const char * suffix);75 extern void socket_print_error(FILE * output, int error_code, const char * prefix, const char * suffix); 76 76 77 77 #endif -
uspace/app/nettest1/Makefile
r9f10660f r3aae4e8 28 28 # 29 29 30 NET_BASE= ../..31 USPACE_PREFIX = ../../../.. 32 LIBS = $(NET_BASE)/socket/libsocket.a 30 USPACE_PREFIX = ../.. 31 LIBS = $(LIBSOCKET_PREFIX)/libsocket.a 32 EXTRA_CFLAGS = -I$(LIBSOCKET_PREFIX)/include 33 33 BINARY = nettest1 34 34 35 35 SOURCES = \ 36 36 nettest1.c \ 37 $(NET_BASE)/app/nettest.c \38 $(NET_BASE)/app/parse.c \39 $(NET_BASE)/app/print_error.c37 nettest.c \ 38 parse.c \ 39 print_error.c 40 40 41 41 include $(USPACE_PREFIX)/Makefile.common -
uspace/app/nettest1/nettest.c
r9f10660f r3aae4e8 37 37 #include <stdio.h> 38 38 39 #include "../include/socket.h" 40 41 #include "../err.h" 39 #include <socket.h> 40 #include <net_err.h> 42 41 43 42 #include "nettest.h" -
uspace/app/nettest1/nettest.h
r9f10660f r3aae4e8 38 38 #define __NET_TEST__ 39 39 40 #include "../include/socket.h"40 #include <socket.h> 41 41 42 42 /** Prints a mark. … … 44 44 * @param[in] index The index of the mark to be printed. 45 45 */ 46 void print_mark(int index);46 extern void print_mark(int index); 47 47 48 48 /** Creates new sockets. … … 55 55 * @returns Other error codes as defined for the socket() function. 56 56 */ 57 int sockets_create(int verbose, int * socket_ids, int sockets, int family, sock_type_t type);57 extern int sockets_create(int verbose, int * socket_ids, int sockets, int family, sock_type_t type); 58 58 59 59 /** Closes sockets. … … 64 64 * @returns Other error codes as defined for the closesocket() function. 65 65 */ 66 int sockets_close(int verbose, int * socket_ids, int sockets);66 extern int sockets_close(int verbose, int * socket_ids, int sockets); 67 67 68 68 /** Connects sockets. … … 75 75 * @returns Other error codes as defined for the connect() function. 76 76 */ 77 int sockets_connect(int verbose, int * socket_ids, int sockets, struct sockaddr * address, socklen_t addrlen);77 extern int sockets_connect(int verbose, int * socket_ids, int sockets, struct sockaddr * address, socklen_t addrlen); 78 78 79 79 /** Sends data via sockets. … … 89 89 * @returns Other error codes as defined for the sendto() function. 90 90 */ 91 int sockets_sendto(int verbose, int * socket_ids, int sockets, struct sockaddr * address, socklen_t addrlen, char * data, int size, int messages);91 extern int sockets_sendto(int verbose, int * socket_ids, int sockets, struct sockaddr * address, socklen_t addrlen, char * data, int size, int messages); 92 92 93 93 /** Receives data via sockets. … … 103 103 * @returns Other error codes as defined for the recvfrom() function. 104 104 */ 105 int sockets_recvfrom(int verbose, int * socket_ids, int sockets, struct sockaddr * address, socklen_t * addrlen, char * data, int size, int messages);105 extern int sockets_recvfrom(int verbose, int * socket_ids, int sockets, struct sockaddr * address, socklen_t * addrlen, char * data, int size, int messages); 106 106 107 107 /** Sends and receives data via sockets. … … 119 119 * @returns Other error codes as defined for the recvfrom() function. 120 120 */ 121 int sockets_sendto_recvfrom(int verbose, int * socket_ids, int sockets, struct sockaddr * address, socklen_t * addrlen, char * data, int size, int messages);121 extern int sockets_sendto_recvfrom(int verbose, int * socket_ids, int sockets, struct sockaddr * address, socklen_t * addrlen, char * data, int size, int messages); 122 122 123 123 #endif -
uspace/app/nettest1/nettest1.c
r9f10660f r3aae4e8 41 41 #include <time.h> 42 42 43 #include "../../include/in.h" 44 #include "../../include/in6.h" 45 #include "../../include/inet.h" 46 #include "../../include/socket.h" 47 48 #include "../../err.h" 49 50 #include "../nettest.h" 51 #include "../parse.h" 52 #include "../print_error.h" 43 #include <in.h> 44 #include <in6.h> 45 #include <inet.h> 46 #include <socket.h> 47 #include <net_err.h> 48 49 #include "nettest.h" 50 #include "parse.h" 51 #include "print_error.h" 53 52 54 53 /** Echo module name. -
uspace/app/nettest2/Makefile
r9f10660f r3aae4e8 28 28 # 29 29 30 NET_BASE= ../..31 USPACE_PREFIX = ../../../.. 32 LIBS = $(NET_BASE)/socket/libsocket.a 30 USPACE_PREFIX = ../.. 31 LIBS = $(LIBSOCKET_PREFIX)/libsocket.a 32 EXTRA_CFLAGS = -I$(LIBSOCKET_PREFIX)/include 33 33 BINARY = nettest2 34 34 35 35 SOURCES = \ 36 36 nettest2.c \ 37 $(NET_BASE)/app/nettest.c \38 $(NET_BASE)/app/parse.c \39 $(NET_BASE)/app/print_error.c37 nettest.c \ 38 parse.c \ 39 print_error.c 40 40 41 41 include $(USPACE_PREFIX)/Makefile.common -
uspace/app/nettest2/nettest2.c
r9f10660f r3aae4e8 41 41 #include <time.h> 42 42 43 #include "../../include/in.h" 44 #include "../../include/in6.h" 45 #include "../../include/inet.h" 46 #include "../../include/socket.h" 47 48 #include "../../err.h" 49 50 #include "../nettest.h" 51 #include "../parse.h" 52 #include "../print_error.h" 43 #include <in.h> 44 #include <in6.h> 45 #include <inet.h> 46 #include <socket.h> 47 #include <net_err.h> 48 49 #include "nettest.h" 50 #include "parse.h" 51 #include "print_error.h" 53 52 54 53 /** Echo module name. -
uspace/app/ping/Makefile
r9f10660f r3aae4e8 28 28 # 29 29 30 NET_BASE= ../..31 USPACE_PREFIX = ../../../.. 32 LIBS = $(NET_BASE)/socket/libsocket.a 33 BINARY = echo30 USPACE_PREFIX = ../.. 31 LIBS = $(LIBSOCKET_PREFIX)/libsocket.a 32 EXTRA_CFLAGS = -I$(LIBSOCKET_PREFIX)/include 33 BINARY = ping 34 34 35 35 SOURCES = \ 36 echo.c \37 $(NET_BASE)/app/parse.c \38 $(NET_BASE)/app/print_error.c36 ping.c \ 37 parse.c \ 38 print_error.c 39 39 40 40 include $(USPACE_PREFIX)/Makefile.common -
uspace/app/ping/ping.c
r9f10660f r3aae4e8 42 42 #include <ipc/services.h> 43 43 44 #include "../../include/icmp_api.h" 45 #include "../../include/in.h" 46 #include "../../include/in6.h" 47 #include "../../include/inet.h" 48 #include "../../include/ip_codes.h" 49 #include "../../include/socket_errno.h" 50 51 #include "../../err.h" 52 53 #include "../parse.h" 54 #include "../print_error.h" 44 #include <icmp_api.h> 45 #include <in.h> 46 #include <in6.h> 47 #include <inet.h> 48 #include <ip_codes.h> 49 #include <socket_errno.h> 50 #include <net_err.h> 51 52 #include "parse.h" 53 #include "print_error.h" 55 54 56 55 /** Echo module name. -
uspace/app/sbi/Makefile
r9f10660f r3aae4e8 28 28 29 29 USPACE_PREFIX = ../.. 30 LIBS = $(LIB _PREFIX)/clui/libclui.a31 EXTRA_CFLAGS = -D__HELENOS__ -I$(LIB _PREFIX)/clui30 LIBS = $(LIBCLUI_PREFIX)/libclui.a 31 EXTRA_CFLAGS = -D__HELENOS__ -I$(LIBCLUI_PREFIX) 32 32 33 33 BINARY = sbi -
uspace/app/sbi/src/os/helenos.c
r9f10660f r3aae4e8 105 105 { 106 106 char *line; 107 int rc; 107 108 108 109 if (tinput == NULL) { … … 112 113 } 113 114 114 line = tinput_read(tinput); 115 if (line == NULL) 115 rc = tinput_read(tinput, &line); 116 if (rc == ENOENT) { 117 /* User-requested abort */ 118 *ptr = os_str_dup(""); 119 return EOK; 120 } 121 122 if (rc != EOK) { 123 /* Error in communication with console */ 116 124 return EIO; 125 } 117 126 118 127 /* XXX Input module needs trailing newline to keep going. */
Note:
See TracChangeset
for help on using the changeset viewer.