Changeset 5db9084 in mainline for uspace/app
- Timestamp:
- 2010-04-04T22:01:32Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 73060801
- Parents:
- 59ecd4a3
- Location:
- uspace/app
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/input.c
r59ecd4a3 r5db9084 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
r59ecd4a3 r5db9084 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/sbi/src/os/helenos.c
r59ecd4a3 r5db9084 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.