Changeset 65fb232 in mainline for genarch/src/ofw/ofw.c
- Timestamp:
- 2005-12-30T22:38:23Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6ccb238
- Parents:
- 80bff342
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
genarch/src/ofw/ofw.c
r80bff342 r65fb232 36 36 37 37 phandle ofw_chosen; 38 ihandle ofw_stdin; 38 39 ihandle ofw_stdout; 39 40 … … 44 45 ofw_done(); 45 46 47 if (ofw_get_property(ofw_chosen, "stdin", &ofw_stdin, sizeof(ofw_stdin)) <= 0) 48 ofw_stdin = 0; 49 46 50 if (ofw_get_property(ofw_chosen, "stdout", &ofw_stdout, sizeof(ofw_stdout)) <= 0) 47 ofw_stdout = 0; 51 ofw_stdout = 0; 48 52 } 49 53 … … 85 89 } 86 90 91 /** Read character from OFW's input. 92 * 93 * This call is non-blocking. 94 * 95 * @return 0 if no character was read, character read otherwise. 96 */ 97 char ofw_getchar(void) 98 { 99 char ch; 100 101 if (ofw_stdin == 0) 102 return 0; 103 104 if (ofw_call("read", 3, 1, ofw_stdin, &ch, 1) == 1) 105 return ch; 106 else 107 return 0; 108 } 109 87 110 phandle ofw_find_device(const char *name) 88 111 {
Note:
See TracChangeset
for help on using the changeset viewer.