Changeset 1ebc1a62 in mainline for uspace/app/sbi/src/os/posix.c
- Timestamp:
- 2010-03-29T20:30:29Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a95310e
- Parents:
- 5da468e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/sbi/src/os/posix.c
r5da468e r1ebc1a62 92 92 } 93 93 94 #define OS_INPUT_BUFFER_SIZE 256 95 static char os_input_buffer[OS_INPUT_BUFFER_SIZE]; 96 97 /** Read one line of input from the user. */ 98 int os_input_line(char **ptr) 99 { 100 if (fgets(os_input_buffer, OS_INPUT_BUFFER_SIZE, stdin) == NULL) 101 os_input_buffer[0] = '\0'; 102 103 if (ferror(stdin)) { 104 *ptr = NULL; 105 return EIO; 106 } 107 108 *ptr = strdup(os_input_buffer); 109 return EOK; 110 } 111 94 112 /** Simple command execution. */ 95 113 int os_exec(char *const cmd[])
Note:
See TracChangeset
for help on using the changeset viewer.